summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index a468962491..f0c17ea0d3 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -3052,11 +3052,18 @@ process_double:
}
if (ptr != str + length) {
- if (!allow_errors) {
- return 0;
+ const char *endptr = ptr;
+ while (*endptr == ' ' || *endptr == '\t' || *endptr == '\n' || *endptr == '\r' || *endptr == '\v' || *endptr == '\f') {
+ endptr++;
+ length--;
}
- if (allow_errors == -1) {
- zend_error(E_NOTICE, "A non well formed numeric value encountered");
+ if (ptr != str + length) {
+ if (!allow_errors) {
+ return 0;
+ }
+ if (allow_errors == -1) {
+ zend_error(E_NOTICE, "A non well formed numeric value encountered");
+ }
if (EG(exception)) {
return 0;
}