You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On certain circumstances, in init() method a PHP warning is thrown:
Warning: Undefined array key "QUERY_STRING" in path/to/vendor/mmamedov/page-cache/src/PageCache.php on line 133
It seems $_SERVER['QUERY_STRING'] may not be set sometimes (for me: PHP 8 on localhost/internal webserver). This causes PHP to generate a warning, when the init() method calls the log method – passing URI, script name and query string.
According to the Manual [1], one indeed ”may or may not find any of the elements in $_SERVER”. So my proposal is to introduce a check if $_SERVER fields are set. If a PR is welcome, I'll happily send one around.
On certain circumstances, in init() method a PHP warning is thrown:
It seems
$_SERVER['QUERY_STRING']
may not be set sometimes (for me: PHP 8 on localhost/internal webserver). This causes PHP to generate a warning, when the init() method calls the log method – passing URI, script name and query string.According to the Manual [1], one indeed ”may or may not find any of the elements in
$_SERVER
”. So my proposal is to introduce a check if$_SERVER
fields are set. If a PR is welcome, I'll happily send one around.[1] https://www.php.net/manual/en/reserved.variables.server.php
The text was updated successfully, but these errors were encountered: