Reputation: 413
Code:
function load_file()
{
....
if (($error=error_get_last())!==null) {
$this->clear();
return false;
}
}
I need to clear error_get_last() after every time when i use this function. How can i do it?
Upvotes: 1
Views: 2396
Reputation: 472
Although I am late but for future reference the error_clear_last()
is available in PHP 7. Get the last error using error_get_last()
and clear it using the above function.
Note: Since PHP 7.2 $php_errormsg
variable has been deprecated. See the PHP RFC for reference.
https://wiki.php.net/rfc/deprecations_php_7_2
Upvotes: 1