Skip to content

Commit 64ce622

Browse files
committed
Merge branch 'master' into jit-dynasm
2 parents 1eec656 + 2bcc7c5 commit 64ce622

File tree

16 files changed

+360
-126
lines changed

16 files changed

+360
-126
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ PHP NEWS
77
'php ext_skel.php' for all options. This means there is no dependencies
88
thrus making it work on Windows out of the box. (Kalle)
99
. Fixed bug #75031 (support append mode in temp/memory streams). (adsr)
10+
. Fixed bug #74860 (Uncaught exceptions not being formatted properly when
11+
error_log set to "syslog"). (Philip Prindeville)
1012

1113
- cURL:
1214
. Fixed bug #74125 (Fixed finding CURL on systems with multiarch support).

Zend/zend_API.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_error(zend_bool throw_
832832
#define Z_PARAM_ARRAY_OR_OBJECT_EX(dest, check_null, separate) \
833833
Z_PARAM_ARRAY_OR_OBJECT_EX2(dest, check_null, separate, separate)
834834

835-
#define Z_PARAM_ARRAY_OR_OBJECT(dest, check_null, separate) \
835+
#define Z_PARAM_ARRAY_OR_OBJECT(dest) \
836836
Z_PARAM_ARRAY_OR_OBJECT_EX(dest, 0, 0)
837837

838838
/* old "b" */

Zend/zend_smart_string.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ static zend_always_inline void smart_string_setl(smart_string *dest, char *src,
136136
dest->c = src;
137137
}
138138

139+
static zend_always_inline void smart_string_reset(smart_string *str) {
140+
str->len = 0;
141+
}
142+
139143
#endif
140144

141145
/*

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1443,7 +1443,7 @@ PHP_ADD_SOURCES(main, main.c snprintf.c spprintf.c php_sprintf.c \
14431443
php_ini.c SAPI.c rfc1867.c php_content_types.c strlcpy.c \
14441444
strlcat.c explicit_bzero.c mergesort.c reentrancy.c php_variables.c php_ticks.c \
14451445
network.c php_open_temporary_file.c \
1446-
output.c getopt.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
1446+
output.c getopt.c php_syslog.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
14471447

14481448
PHP_ADD_SOURCES_X(main, fastcgi.c, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1, PHP_FASTCGI_OBJS, no)
14491449

ext/gd/gd.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,14 +1101,14 @@ PHP_MINIT_FUNCTION(gd)
11011101

11021102
REGISTER_INI_ENTRIES();
11031103

1104-
REGISTER_LONG_CONSTANT("IMG_GIF", 1, CONST_CS | CONST_PERSISTENT);
1105-
REGISTER_LONG_CONSTANT("IMG_JPG", 2, CONST_CS | CONST_PERSISTENT);
1106-
REGISTER_LONG_CONSTANT("IMG_JPEG", 2, CONST_CS | CONST_PERSISTENT);
1107-
REGISTER_LONG_CONSTANT("IMG_PNG", 4, CONST_CS | CONST_PERSISTENT);
1108-
REGISTER_LONG_CONSTANT("IMG_WBMP", 8, CONST_CS | CONST_PERSISTENT);
1109-
REGISTER_LONG_CONSTANT("IMG_XPM", 16, CONST_CS | CONST_PERSISTENT);
1110-
REGISTER_LONG_CONSTANT("IMG_WEBP", 32, CONST_CS | CONST_PERSISTENT);
1111-
REGISTER_LONG_CONSTANT("IMG_BMP", 64, CONST_CS | CONST_PERSISTENT);
1104+
REGISTER_LONG_CONSTANT("IMG_GIF", PHP_IMG_GIF, CONST_CS | CONST_PERSISTENT);
1105+
REGISTER_LONG_CONSTANT("IMG_JPG", PHP_IMG_JPG, CONST_CS | CONST_PERSISTENT);
1106+
REGISTER_LONG_CONSTANT("IMG_JPEG", PHP_IMG_JPEG, CONST_CS | CONST_PERSISTENT);
1107+
REGISTER_LONG_CONSTANT("IMG_PNG", PHP_IMG_PNG, CONST_CS | CONST_PERSISTENT);
1108+
REGISTER_LONG_CONSTANT("IMG_WBMP", PHP_IMG_WBMP, CONST_CS | CONST_PERSISTENT);
1109+
REGISTER_LONG_CONSTANT("IMG_XPM", PHP_IMG_XPM, CONST_CS | CONST_PERSISTENT);
1110+
REGISTER_LONG_CONSTANT("IMG_WEBP", PHP_IMG_WEBP, CONST_CS | CONST_PERSISTENT);
1111+
REGISTER_LONG_CONSTANT("IMG_BMP", PHP_IMG_BMP, CONST_CS | CONST_PERSISTENT);
11121112

11131113
/* special colours for gd */
11141114
REGISTER_LONG_CONSTANT("IMG_COLOR_TILED", gdTiled, CONST_CS | CONST_PERSISTENT);
@@ -2174,23 +2174,23 @@ PHP_FUNCTION(imagecreate)
21742174
Return the types of images supported in a bitfield - 1=GIF, 2=JPEG, 4=PNG, 8=WBMP, 16=XPM */
21752175
PHP_FUNCTION(imagetypes)
21762176
{
2177-
int ret=0;
2178-
ret = 1;
2177+
int ret = 0;
2178+
ret = PHP_IMG_GIF;
21792179
#ifdef HAVE_GD_JPG
2180-
ret |= 2;
2180+
ret |= PHP_IMG_JPG;
21812181
#endif
21822182
#ifdef HAVE_GD_PNG
2183-
ret |= 4;
2183+
ret |= PHP_IMG_PNG;
21842184
#endif
2185-
ret |= 8;
2185+
ret |= PHP_IMG_WBMP;
21862186
#if defined(HAVE_GD_XPM)
2187-
ret |= 16;
2187+
ret |= PHP_IMG_XPM;
21882188
#endif
21892189
#ifdef HAVE_GD_WEBP
2190-
ret |= 32;
2190+
ret |= PHP_IMG_WEBP;
21912191
#endif
21922192
#ifdef HAVE_GD_BMP
2193-
ret |= 64;
2193+
ret |= PHP_IMG_BMP;
21942194
#endif
21952195

21962196
if (zend_parse_parameters_none() == FAILURE) {

ext/gd/php_gd.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@
5050
#define PHP_GDIMG_TYPE_WEBP 11
5151
#define PHP_GDIMG_TYPE_BMP 12
5252

53+
#define PHP_IMG_GIF 1
54+
#define PHP_IMG_JPG 2
55+
#define PHP_IMG_JPEG 2
56+
#define PHP_IMG_PNG 4
57+
#define PHP_IMG_WBMP 8
58+
#define PHP_IMG_XPM 16
59+
#define PHP_IMG_WEBP 32
60+
#define PHP_IMG_BMP 64
61+
5362
#ifdef PHP_WIN32
5463
# define PHP_GD_API __declspec(dllexport)
5564
#elif defined(__GNUC__) && __GNUC__ >= 4

ext/opcache/Optimizer/zend_inference.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3187,10 +3187,10 @@ static int zend_update_type_info(const zend_op_array *op_array,
31873187
break;
31883188
case ZEND_GET_CLASS:
31893189
case ZEND_GET_CALLED_CLASS:
3190-
UPDATE_SSA_TYPE(MAY_BE_FALSE|MAY_BE_STRING, ssa_ops[i].result_def);
3190+
UPDATE_SSA_TYPE(MAY_BE_FALSE|MAY_BE_STRING|MAY_BE_RCN, ssa_ops[i].result_def);
31913191
break;
31923192
case ZEND_GET_TYPE:
3193-
UPDATE_SSA_TYPE(MAY_BE_STRING, ssa_ops[i].result_def);
3193+
UPDATE_SSA_TYPE(MAY_BE_STRING|MAY_BE_RC1|MAY_BE_RCN, ssa_ops[i].result_def);
31943194
break;
31953195
case ZEND_TYPE_CHECK:
31963196
case ZEND_DEFINED:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
--TEST--
2+
openssl_get_cert_locations() tests
3+
--SKIPIF--
4+
<?php if (!extension_loaded("openssl")) print "skip"; ?>
5+
--FILE--
6+
<?php
7+
// openssl locations differ per distro.
8+
var_dump(openssl_get_cert_locations());
9+
?>
10+
--EXPECTF--
11+
array(8) {
12+
["default_cert_file"]=>
13+
string(%d) "%s"
14+
["default_cert_file_env"]=>
15+
string(%d) "%s"
16+
["default_cert_dir"]=>
17+
string(%d) "%s"
18+
["default_cert_dir_env"]=>
19+
string(%d) "%s"
20+
["default_private_dir"]=>
21+
string(%d) "%s"
22+
["default_default_cert_area"]=>
23+
string(%d) "%s"
24+
["ini_cafile"]=>
25+
string(%d) ""
26+
["ini_capath"]=>
27+
string(%d) ""
28+
}

0 commit comments

Comments
 (0)