|
@@ 1483-1493 (lines=11) @@
|
| 1480 |
|
* @param string $context |
| 1481 |
|
* @param mixed $error |
| 1482 |
|
*/ |
| 1483 |
|
public function error( $context, $error ) { |
| 1484 |
|
|
| 1485 |
|
if ( empty( $context ) || empty( $error ) ) { |
| 1486 |
|
return; |
| 1487 |
|
} |
| 1488 |
|
|
| 1489 |
|
$this->do_action( 'hmbkp_error' ); |
| 1490 |
|
|
| 1491 |
|
$this->errors[ $context ][ $_key = md5( implode( ':', (array) $error ) ) ] = $error; |
| 1492 |
|
|
| 1493 |
|
} |
| 1494 |
|
|
| 1495 |
|
/** |
| 1496 |
|
* Migrate errors to warnings |
|
@@ 1542-1552 (lines=11) @@
|
| 1539 |
|
* @param string $context |
| 1540 |
|
* @param mixed $warning |
| 1541 |
|
*/ |
| 1542 |
|
private function warning( $context, $warning ) { |
| 1543 |
|
|
| 1544 |
|
if ( empty( $context ) || empty( $warning ) ) { |
| 1545 |
|
return; |
| 1546 |
|
} |
| 1547 |
|
|
| 1548 |
|
$this->do_action( 'hmbkp_warning' ); |
| 1549 |
|
|
| 1550 |
|
$this->warnings[ $context ][ $_key = md5( implode( ':', (array) $warning ) ) ] = $warning; |
| 1551 |
|
|
| 1552 |
|
} |
| 1553 |
|
|
| 1554 |
|
/** |
| 1555 |
|
* Custom error handler for catching php errors |