Skip to content

Commit b62fb3a

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Simpler fix for #74974
2 parents 0ddda0d + 34e5d3a commit b62fb3a

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

Zend/zend_operators.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,16 +2166,6 @@ ZEND_API int ZEND_FASTCALL is_not_equal_function(zval *result, zval *op1, zval *
21662166

21672167
ZEND_API int ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op2) /* {{{ */
21682168
{
2169-
if (UNEXPECTED((Z_TYPE_P(op1) == IS_DOUBLE) && zend_isnan(Z_DVAL_P(op1)))) {
2170-
ZVAL_FALSE(result);
2171-
return SUCCESS;
2172-
}
2173-
2174-
if (UNEXPECTED((Z_TYPE_P(op2) == IS_DOUBLE) && zend_isnan(Z_DVAL_P(op2)))) {
2175-
ZVAL_FALSE(result);
2176-
return SUCCESS;
2177-
}
2178-
21792169
if (compare_function(result, op1, op2) == FAILURE) {
21802170
return FAILURE;
21812171
}
@@ -2186,16 +2176,6 @@ ZEND_API int ZEND_FASTCALL is_smaller_function(zval *result, zval *op1, zval *op
21862176

21872177
ZEND_API int ZEND_FASTCALL is_smaller_or_equal_function(zval *result, zval *op1, zval *op2) /* {{{ */
21882178
{
2189-
if (UNEXPECTED((Z_TYPE_P(op1) == IS_DOUBLE) && isnan(Z_DVAL_P(op1)))) {
2190-
ZVAL_FALSE(result);
2191-
return SUCCESS;
2192-
}
2193-
2194-
if (UNEXPECTED((Z_TYPE_P(op2) == IS_DOUBLE) && isnan(Z_DVAL_P(op2)))) {
2195-
ZVAL_FALSE(result);
2196-
return SUCCESS;
2197-
}
2198-
21992179
if (compare_function(result, op1, op2) == FAILURE) {
22002180
return FAILURE;
22012181
}

Zend/zend_portability.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ char *alloca();
433433
#define ZEND_STRL(str) (str), (sizeof(str)-1)
434434
#define ZEND_STRS(str) (str), (sizeof(str))
435435
#define ZEND_NORMALIZE_BOOL(n) \
436-
((n) ? (((n)>0) ? 1 : -1) : 0)
436+
((n) ? (((n)<0) ? -1 : 1) : 0)
437437
#define ZEND_TRUTH(x) ((x) ? 1 : 0)
438438
#define ZEND_LOG_XOR(a, b) (ZEND_TRUTH(a) ^ ZEND_TRUTH(b))
439439

0 commit comments

Comments
 (0)