| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function __construct($message = "", $code = 0, $previous = null) |
||
| 28 | { |
||
| 29 | $lastError = error_get_last(); |
||
| 30 | if($lastError){ |
||
|
|
|||
| 31 | $message .= "\n"; |
||
| 32 | $message .= "Additional information provided by error_get_last():\n"; |
||
| 33 | $message .= "{$lastError['message']} in {$lastError['file']} line {$lastError['line']}"; |
||
| 34 | } |
||
| 35 | parent::__construct($message, $code, $previous); |
||
| 36 | } |
||
| 37 | } |
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.