| @@ 134-136 (lines=3) @@ | ||
| 131 | continue; |
|
| 132 | } |
|
| 133 | ||
| 134 | if (null !== $filter->getCookie() && |
|
| 135 | strpos($meta['SERVER']['HTTP_COOKIE'], $filter->getCookie()) === false |
|
| 136 | ) { |
|
| 137 | continue; |
|
| 138 | } |
|
| 139 | ||
| @@ 64-71 (lines=8) @@ | ||
| 61 | $tmp = []; |
|
| 62 | while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
| 63 | $meta = json_decode($row['meta'], true); |
|
| 64 | if ($filter->getCookie()) { |
|
| 65 | // because cookie is not parsed and stored in separate structure we need to double check if |
|
| 66 | // value that we search is in fact in http cookie server field. SQL filter only checks whole |
|
| 67 | // meta |
|
| 68 | if (strpos($meta['SERVER']['HTTP_COOKIE'], $filter->getCookie()) === false) { |
|
| 69 | continue; |
|
| 70 | } |
|
| 71 | } |
|
| 72 | $tmp[$row['id']] = $row; |
|
| 73 | $tmp[$row['id']]['profile'] = json_decode($row['profiles'], true); |
|
| 74 | $tmp[$row['id']]['meta'] = $meta; |
|