Concrete5.8 to concrete 9 migration

If concrete executes
echo $unseVariable

It throughs an exception and will not run any more code

If php version 8 does not through an exception for test.php executed directly

echo $unsetVariable

debug => [
‘display_errors’ => 0,
‘detail’ => ‘message’,
‘error_reporting’ => null,

I have not overwritten any other relevent setting

In my php,ini
display_errors = 0
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED

This means somewhere is exception handler it is catching the errors.

Please can you tell me which setting to change to stop it doing this. It will take a long time in upgrading all the websites (over 100) we run to make sure all the variables are set before it is chacked I have also found errors core that thows isset error so there must be a setting we can change…

The quick fix for such is to use the null coalescing operator

echo $unsetVariable??null;

1 Like

I think the title of this post is misleading, since it has nothing to do with concrete’s versions nor migration.

Something like ‘How to handle PHP 8+ unset variables’ would be better, but I don’t know how that works/doesn’t with the new forum software?