Skip to content

Commit 8c4156e

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
2 parents d9ebd0f + 3cc6bd1 commit 8c4156e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

NEWS

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ PHP NEWS
99
match). (Bob)
1010
. Fixed bug #67091 (make install fails to install libphp5.so on FreeBSD 10.0).
1111
(Ferenc)
12-
. Fixed buf #67497 (eval with parse error causes segmentation fault in
12+
. Fixed bug #67497 (eval with parse error causes segmentation fault in
1313
generator). (Nikita)
14+
. Fixed bug #67151 (strtr with empty array crashes). (Nikita)
1415

1516
- CLI server:
1617
. Implemented FR #67429 (CLI server is missing some new HTTP response codes).

ext/standard/string.c

+4
Original file line numberDiff line numberDiff line change
@@ -3106,6 +3106,10 @@ static void php_strtr_array(zval *return_value, char *str, int slen, HashTable *
31063106
int patterns_len;
31073107
zend_llist *allocs;
31083108

3109+
if (zend_hash_num_elements(pats) == 0) {
3110+
RETURN_STRINGL(str, slen, 1);
3111+
}
3112+
31093113
S(&text) = str;
31103114
L(&text) = slen;
31113115

0 commit comments

Comments
 (0)