|
33 | 33 | $rows = $this('config')->get('packages'); |
34 | 34 |
|
35 | 35 | foreach ($rows as $name => $row) { |
36 | | - if (($data['filter'] === 'default' && strpos($name, 'inceptphp/') !== 0) |
37 | | - || ($data['filter'] === 'custom' && strpos($name, 'inceptphp/') === 0) |
| 36 | + if (($data['filter'] === 'default' && strpos((string) $name, 'inceptphp/') !== 0) |
| 37 | + || ($data['filter'] === 'custom' && strpos((string) $name, 'inceptphp/') === 0) |
38 | 38 | ) { |
39 | 39 | continue; |
40 | 40 | } |
|
45 | 45 | } else { |
46 | 46 | $path = null; |
47 | 47 | //if it starts with / like /foo/bar |
48 | | - if (strpos($name, '/') === 0) { |
| 48 | + if (strpos((string) $name, '/') === 0) { |
49 | 49 | //it's a root package |
50 | 50 | $path = INCEPT_CWD . $name; |
51 | 51 | //if theres a slash like foo/bar |
52 | | - } else if (strpos($name, '/') !== false) { |
| 52 | + } else if (strpos((string) $name, '/') !== false) { |
53 | 53 | //it's vendor package |
54 | 54 | $path = sprintf('%s/vendor/%s', INCEPT_CWD, $name); |
55 | 55 | } |
|
74 | 74 |
|
75 | 75 | if (isset($rows[$name]['info']['settings'])) { |
76 | 76 | $rows[$name]['info']['open'] = strpos( |
77 | | - $rows[$name]['info']['settings'], |
| 77 | + (string) $rows[$name]['info']['settings'], |
78 | 78 | '/admin/spa/' |
79 | 79 | ) === 0; |
80 | 80 | } |
|
152 | 152 | } else { |
153 | 153 | $path = null; |
154 | 154 | //if it starts with / like /foo/bar |
155 | | - if (strpos($name, '/') === 0) { |
| 155 | + if (strpos((string) $name, '/') === 0) { |
156 | 156 | //it's a root package |
157 | 157 | $path = INCEPT_CWD . $name; |
158 | 158 | //if theres a slash like foo/bar |
159 | | - } else if (strpos($name, '/') !== false) { |
| 159 | + } else if (strpos((string) $name, '/') !== false) { |
160 | 160 | //it's vendor package |
161 | 161 | $path = sprintf('%s/vendor/%s', INCEPT_CWD, $name); |
162 | 162 | } |
|
273 | 273 | } else { |
274 | 274 | $path = null; |
275 | 275 | //if it starts with / like /foo/bar |
276 | | - if (strpos($name, '/') === 0) { |
| 276 | + if (strpos((string) $name, '/') === 0) { |
277 | 277 | //it's a root package |
278 | 278 | $path = INCEPT_CWD . $name; |
279 | 279 | //if theres a slash like foo/bar |
280 | | - } else if (strpos($name, '/') !== false) { |
| 280 | + } else if (strpos((string) $name, '/') !== false) { |
281 | 281 | //it's vendor package |
282 | 282 | $path = sprintf('%s/vendor/%s', INCEPT_CWD, $name); |
283 | 283 | } |
|
394 | 394 | } else { |
395 | 395 | $path = null; |
396 | 396 | //if it starts with / like /foo/bar |
397 | | - if (strpos($name, '/') === 0) { |
| 397 | + if (strpos((string) $name, '/') === 0) { |
398 | 398 | //it's a root package |
399 | 399 | $path = INCEPT_CWD . $name; |
400 | 400 | //if theres a slash like foo/bar |
401 | | - } else if (strpos($name, '/') !== false) { |
| 401 | + } else if (strpos((string) $name, '/') !== false) { |
402 | 402 | //it's vendor package |
403 | 403 | $path = sprintf('%s/vendor/%s', INCEPT_CWD, $name); |
404 | 404 | } |
|
0 commit comments