potsky / PimpMyLog

🍭 Log viewer for your web server
http://pimpmylog.com
GNU General Public License v3.0
594 stars 89 forks source link

unexpected T_FUNCTION, [PHP 5.2] #118

Closed umbertix closed 7 years ago

umbertix commented 7 years ago

PHP Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /usr/local/www/apache22/data/dev-pimpmylog.com/inc/configure.php on line 47.

As explained in another thread the problem is to create a function and then use that new function in the error handler.

I did the change on my local files, but would be nice to fix it in the repo aswell.

potsky commented 7 years ago

Hi @umbertix,

can you send me your fix please ?

umbertix commented 7 years ago

On the line 47, replace for this: function dumb_change($errno, $errstr, $errfile, $errline, array $errcontext) { throw new ErrorException($errstr, 0, $errno, $errfile, $errline); }; set_error_handler("dumb_change");

You probably want to rename the function name :)