| @@ 104-112 (lines=9) @@ | ||
| 101 | ||
| 102 | } |
|
| 103 | ||
| 104 | private function warning( $context, $warning ) { |
|
| 105 | ||
| 106 | if ( empty( $context ) || empty( $warning ) ) { |
|
| 107 | return; |
|
| 108 | } |
|
| 109 | ||
| 110 | $this->warnings[ $context ][ $_key = md5( implode( ':', (array) $warning ) ) ] = $warning; |
|
| 111 | ||
| 112 | } |
|
| 113 | ||
| 114 | public function error_handler( $type ) { |
|
| 115 | ||
| @@ 1390-1400 (lines=11) @@ | ||
| 1387 | * @param string $context |
|
| 1388 | * @param mixed $error |
|
| 1389 | */ |
|
| 1390 | public function error( $context, $error ) { |
|
| 1391 | ||
| 1392 | if ( empty( $context ) || empty( $error ) ) { |
|
| 1393 | return; |
|
| 1394 | } |
|
| 1395 | ||
| 1396 | $this->do_action( 'hmbkp_error' ); |
|
| 1397 | ||
| 1398 | $this->errors[ $context ][ $_key = md5( implode( ':', (array) $error ) ) ] = $error; |
|
| 1399 | ||
| 1400 | } |
|
| 1401 | ||
| 1402 | /** |
|
| 1403 | * Migrate errors to warnings |
|
| @@ 1449-1459 (lines=11) @@ | ||
| 1446 | * @param string $context |
|
| 1447 | * @param mixed $warning |
|
| 1448 | */ |
|
| 1449 | private function warning( $context, $warning ) { |
|
| 1450 | ||
| 1451 | if ( empty( $context ) || empty( $warning ) ) { |
|
| 1452 | return; |
|
| 1453 | } |
|
| 1454 | ||
| 1455 | $this->do_action( 'hmbkp_warning' ); |
|
| 1456 | ||
| 1457 | $this->warnings[ $context ][ $_key = md5( implode( ':', (array) $warning ) ) ] = $warning; |
|
| 1458 | ||
| 1459 | } |
|
| 1460 | ||
| 1461 | /** |
|
| 1462 | * Custom error handler for catching php errors |
|