Hide differences in PHP 7.2 error reporting
It adds (this will throw an Error in a future version of PHP) to undefined constant error. Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
456ec18cb1
commit
fc2ac9f4c6
@ -441,8 +441,13 @@ class Advisor
|
||||
|
||||
// Error handling
|
||||
if ($err) {
|
||||
// Remove PHP 7.2 and newer notice (it's not really interesting for user)
|
||||
throw new Exception(
|
||||
strip_tags($err)
|
||||
str_replace(
|
||||
' (this will throw an Error in a future version of PHP)',
|
||||
'',
|
||||
strip_tags($err)
|
||||
)
|
||||
. '<br />Executed code: $value = ' . htmlspecialchars($expr) . ';'
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user