1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-06-09 07:35:04 +02:00

check if $_REQUEST['REQUEST_URI'] exists before using it

This commit is contained in:
maximebf 2013-08-14 22:10:33 +10:00
parent 8daa6f8f5a
commit 584116f529

View File

@ -171,8 +171,8 @@ class DebugBar implements ArrayAccess
'id' => $this->getCurrentRequestId(),
'datetime' => date('Y-m-d H:i:s'),
'utime' => microtime(true),
'uri' => $_SERVER['REQUEST_URI'],
'ip' => $_SERVER['REMOTE_ADDR']
'uri' => isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : null,
'ip' => isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : null
)
);