fix PHP 8.0 error when converting an InfoLog into a ticket

Cannot access offset of type string on string
Also add line and file to our non-json exception handler, for easier identifying the problems
This commit is contained in:
Ralf Becker 2021-10-14 08:04:12 +02:00
parent fdd275c605
commit ccadef611d
2 changed files with 2 additions and 1 deletions

View File

@ -471,7 +471,7 @@ class Link extends Link\Storage
*/ */
static function temp_link_id($app,$id) static function temp_link_id($app,$id)
{ {
return $app.':'.(!in_array($app, array(self::VFS_APPNAME,self::VFS_LINK, self::DATA_APPNAME)) ? $id : $id['name']); return $app.':'.(!in_array($app, array(self::VFS_APPNAME,self::VFS_LINK, self::DATA_APPNAME)) || !is_array($id) ? $id : $id['name']);
} }
/** /**

View File

@ -104,6 +104,7 @@ function egw_exception_handler($e)
if(!isset($_SERVER['HTTP_HOST']) || $GLOBALS['egw_info']['flags']['no_exception_handler'] == 'cli') if(!isset($_SERVER['HTTP_HOST']) || $GLOBALS['egw_info']['flags']['no_exception_handler'] == 'cli')
{ {
echo ($headline ? $headline.': ' : '').$e->getMessage()."\n"; echo ($headline ? $headline.': ' : '').$e->getMessage()."\n";
echo $e->getFile().' ('.$e->getLine().")\n";
if ($GLOBALS['egw_info']['server']['exception_show_trace']) if ($GLOBALS['egw_info']['server']['exception_show_trace'])
{ {
echo $e->getTraceAsString()."\n"; echo $e->getTraceAsString()."\n";