mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
Merge branch 'MDL-70876_311' of https://github.com/stronk7/moodle into MOODLE_311_STABLE
This commit is contained in:
commit
c9d57344b0
3 changed files with 4 additions and 7 deletions
|
@ -504,10 +504,9 @@ class mock_course_backup_setting extends course_backup_setting {
|
||||||
* @param string $errstr
|
* @param string $errstr
|
||||||
* @param string $errfile
|
* @param string $errfile
|
||||||
* @param int $errline
|
* @param int $errline
|
||||||
* @param array $errcontext
|
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function backup_setting_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
|
function backup_setting_error_handler($errno, $errstr, $errfile, $errline) {
|
||||||
if ($errno !== E_RECOVERABLE_ERROR) {
|
if ($errno !== E_RECOVERABLE_ERROR) {
|
||||||
// Currently we only want to deal with type hinting errors
|
// Currently we only want to deal with type hinting errors
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -124,10 +124,9 @@ function behat_get_error_string($errtype) {
|
||||||
* @param string $errstr
|
* @param string $errstr
|
||||||
* @param string $errfile
|
* @param string $errfile
|
||||||
* @param int $errline
|
* @param int $errline
|
||||||
* @param array $errcontext
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function behat_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
|
function behat_error_handler($errno, $errstr, $errfile, $errline) {
|
||||||
|
|
||||||
// If is preceded by an @ we don't show it.
|
// If is preceded by an @ we don't show it.
|
||||||
if (!error_reporting()) {
|
if (!error_reporting()) {
|
||||||
|
@ -149,7 +148,7 @@ function behat_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Using the default one in case there is a fatal catchable error.
|
// Using the default one in case there is a fatal catchable error.
|
||||||
default_error_handler($errno, $errstr, $errfile, $errline, $errcontext);
|
default_error_handler($errno, $errstr, $errfile, $errline);
|
||||||
|
|
||||||
$errnostr = behat_get_error_string($errno);
|
$errnostr = behat_get_error_string($errno);
|
||||||
|
|
||||||
|
|
|
@ -419,10 +419,9 @@ function default_exception_handler($ex) {
|
||||||
* @param string $errstr
|
* @param string $errstr
|
||||||
* @param string $errfile
|
* @param string $errfile
|
||||||
* @param int $errline
|
* @param int $errline
|
||||||
* @param array $errcontext
|
|
||||||
* @return bool false means use default error handler
|
* @return bool false means use default error handler
|
||||||
*/
|
*/
|
||||||
function default_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
|
function default_error_handler($errno, $errstr, $errfile, $errline) {
|
||||||
if ($errno == 4096) {
|
if ($errno == 4096) {
|
||||||
//fatal catchable error
|
//fatal catchable error
|
||||||
throw new coding_exception('PHP catchable fatal error', $errstr);
|
throw new coding_exception('PHP catchable fatal error', $errstr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue