Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed 'PHP Warning: A non-numeric value encountered'.
- Loading branch information
Bas Elbers
committed
May 23, 2017
1 parent
d08e076
commit 5cbaff4
Showing
1 changed file
with
85 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5cbaff4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced the existing file with this and am still getting some non-numeric value errors:
5cbaff4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also need to change this.
c51b080
5cbaff4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem here is in E_WARNING exception in PHP 7:
https://stackoverflow.com/a/42044413
I solved this problem just by replacing line 89:
$errorlevel = error_reporting($errorlevel & ~E_NOTICE);
with:
$errorlevel = error_reporting($errorlevel & ~(E_NOTICE|E_WARNING));
It's not error!
PS. You can even don't touch source file
Before calling mdpf, turn off E_WARNING
After it finished switch back
5cbaff4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that's fixed it!
5cbaff4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e73744d
5cbaff4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, saved me from hadache 😄
5cbaff4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix suggested by @mealexxxx resolved it. Thanks sir.
5cbaff4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@baselbers you saved me Thanks a lot. It worked perfectly with PHP 7.1.9 for non-numeric value.
5cbaff4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks you so much dud that really work for me thanks a lot