Corveda / PHPSandbox

A PHP-based sandboxing library with a full suite of configuration and validation options.
https://phpsandbox.org
Other
220 stars 46 forks source link

PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED #32

Closed Jobians closed 1 year ago

Jobians commented 1 year ago

I'm using php 8

[25-May-2023 14:13:07 UTC] PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php:7233 Stack trace:

0 /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php(7233): trigger_error('Fatal error: Ca...', 1)

1 /home/test/test.php(21): PHPSandbox\PHPSandbox->__call('setPrepend', Array)

2 {main}

thrown in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php on line 7233 [25-May-2023 14:13:07 UTC] PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php:7233 Stack trace:

0 /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php(7233): trigger_error('Fatal error: Ca...', 1)

1 /home/test/test.php(21): PHPSandbox\PHPSandbox->__call('setPrepend', Array)

2 {main}

thrown in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php on line 7233 [25-May-2023 14:13:09 UTC] PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php:7233 Stack trace:

0 /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php(7233): trigger_error('Fatal error: Ca...', 1)

1 /home/test/test.php(21): PHPSandbox\PHPSandbox->__call('setPrepend', Array)

2 {main}

thrown in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php on line 7233 [25-May-2023 14:13:13 UTC] PHP Fatal error: Uncaught ValueError: trigger_error(): Argument #2 ($error_level) must be one of E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, or E_USER_DEPRECATED in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php:7233 Stack trace:

0 /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php(7233): trigger_error('Fatal error: Ca...', 1)

1 /home/test/test.php(21): PHPSandbox\PHPSandbox->__call('setPrepend', Array)

2 {main}

thrown in /home/test/vendor/corveda/php-sandbox/src/PHPSandbox.php on line 7233

peter279k commented 1 year ago

According to the source code, it seems that the E_ERROR should change into the E_USER_ERROR.