| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function __construct($message = "", $code = 0, $previous = null) |
||
| 29 | { |
||
| 30 | $lastError = error_get_last(); |
||
| 31 | if($lastError){ |
||
|
|
|||
| 32 | $message .= "\n"; |
||
| 33 | $message .= "Additional information provided by error_get_last():\n"; |
||
| 34 | $message .= "{$lastError['message']} in {$lastError['file']} line {$lastError['line']}"; |
||
| 35 | } |
||
| 36 | parent::__construct($message, $code, $previous); |
||
| 37 | } |
||
| 38 | } |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.