mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-09 18:20:50 +00:00
Compare commits
92
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ebd7f36b1 | ||
|
|
3e7c52454f | ||
|
|
b0a5e5835a | ||
|
|
4e1b2bcc59 | ||
|
|
4490467c2e | ||
|
|
4e676c7b1c | ||
|
|
e0a7e0670a | ||
|
|
08daf96c92 | ||
|
|
3b3fafa637 | ||
|
|
928c42211f | ||
|
|
767fa3dc02 | ||
|
|
8946ad3000 | ||
|
|
de738496c2 | ||
|
|
eb063c8a9f | ||
|
|
7bc162f928 | ||
|
|
a89948320b | ||
|
|
0ffa84d740 | ||
|
|
aa7fbdf2cd | ||
|
|
a4bce453bc | ||
|
|
56dba3f3d0 | ||
|
|
5297bed454 | ||
|
|
07877c46e3 | ||
|
|
2ea5a9cc64 | ||
|
|
8e34de4756 | ||
|
|
97dd1591af | ||
|
|
b5cb3ac8ec | ||
|
|
8ed775f548 | ||
|
|
a109fddba4 | ||
|
|
c553d17f11 | ||
|
|
c4294440ff | ||
|
|
b6e58dcd22 | ||
|
|
470f5891d4 | ||
|
|
9222702633 | ||
|
|
b71146bde4 | ||
|
|
186b5de575 | ||
|
|
ee0963c58c | ||
|
|
e74a918621 | ||
|
|
6f7a47db5d | ||
|
|
83d2bc9b6d | ||
|
|
2eaabf06fc | ||
|
|
4da67537c1 | ||
|
|
ec28d4c247 | ||
|
|
be64a06b1c | ||
|
|
fe4d7248cc | ||
|
|
b3935ed2af | ||
|
|
515c51953f | ||
|
|
4f044f680c | ||
|
|
92055ca79b | ||
|
|
bdce2954c3 | ||
|
|
983ba59e3e | ||
|
|
1f86dcdd13 | ||
|
|
38363f4820 | ||
|
|
fc940f0703 | ||
|
|
a095472e62 | ||
|
|
471b1d54d5 | ||
|
|
3b09123de3 | ||
|
|
1bbf7013c8 | ||
|
|
e27301c7b3 | ||
|
|
c9f0e12353 | ||
|
|
65d81833bb | ||
|
|
8be649d908 | ||
|
|
e2edaa0cee | ||
|
|
b2907527e9 | ||
|
|
c0228f741e | ||
|
|
e1c93d1fb2 | ||
|
|
cf56832d00 | ||
|
|
203a2da30a | ||
|
|
7d1df603ad | ||
|
|
3890c8bce5 | ||
|
|
f27f902266 | ||
|
|
362d6ce834 | ||
|
|
cbc5a141f7 | ||
|
|
14684af0d0 | ||
|
|
34898e9766 | ||
|
|
ab3c94a54f | ||
|
|
ef68cd3249 | ||
|
|
0da13086bd | ||
|
|
dc2ffdeed7 | ||
|
|
d9b29029f9 | ||
|
|
0c84c2ef50 | ||
|
|
f78e681428 | ||
|
|
3c98c2d0cb | ||
|
|
d460e06cb9 | ||
|
|
08c5679380 | ||
|
|
e926dc9305 | ||
|
|
cce2e33c84 | ||
|
|
aa9a8dbda3 | ||
|
|
73f222d722 | ||
|
|
e0f97ae7ec | ||
|
|
526344aa5e | ||
|
|
19a9a6ba24 | ||
|
|
76760901fa |
No files matched your search
+1
-1
@@ -16,7 +16,7 @@ environment:
|
||||
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
|
||||
PHP_BUILD_OBJ_DIR: c:\obj
|
||||
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0beta1
|
||||
PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0beta3
|
||||
PHP_BUILD_CRT: vc15
|
||||
# ext and env setup for tests
|
||||
#MYSQL_TEST_PASSWD: Password12!
|
||||
|
||||
@@ -1,5 +1,68 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
07 Mar 2019, PHP 7.3.3
|
||||
|
||||
- Core:
|
||||
. Fixed bug #77589 (Core dump using parse_ini_string with numeric sections).
|
||||
(Laruence)
|
||||
. Fixed bug #77329 (Buffer Overflow via overly long Error Messages).
|
||||
(Dmitry)
|
||||
. Fixed bug #77494 (Disabling class causes segfault on member access).
|
||||
(Dmitry)
|
||||
. Fixed bug #77498 (Custom extension Segmentation fault when declare static
|
||||
property). (Nikita)
|
||||
. Fixed bug #77530 (PHP crashes when parsing `(2)::class`). (Ekin)
|
||||
. Fixed bug #77546 (iptcembed broken function). (gdegoulet)
|
||||
. Fixed bug #77630 (rename() across the device may allow unwanted access
|
||||
during processing). (Stas)
|
||||
|
||||
- COM:
|
||||
. Fixed bug #77621 (Already defined constants are not properly reported).
|
||||
(cmb)
|
||||
. Fixed bug #77626 (Persistence confusion in php_com_import_typelib()). (cmb)
|
||||
|
||||
- EXIF:
|
||||
. Fixed bug #77509 (Uninitialized read in exif_process_IFD_in_TIFF). (Stas)
|
||||
. Fixed bug #77540 (Invalid Read on exif_process_SOFn). (Stas)
|
||||
. Fixed bug #77563 (Uninitialized read in exif_process_IFD_in_MAKERNOTE). (Stas)
|
||||
. Fixed bug #77659 (Uninitialized read in exif_process_IFD_in_MAKERNOTE). (Stas)
|
||||
|
||||
- Mbstring:
|
||||
. Fixed bug #77514 (mb_ereg_replace() with trailing backslash adds null byte).
|
||||
(Nikita)
|
||||
|
||||
- MySQL
|
||||
. Disabled LOCAL INFILE by default, can be enabled using php.ini directive
|
||||
mysqli.allow_local_infile for mysqli, or PDO::MYSQL_ATTR_LOCAL_INFILE
|
||||
attribute for pdo_mysql. (Darek Slusarczyk)
|
||||
|
||||
- OpenSSL:
|
||||
. Fixed bug #77390 (feof might hang on TLS streams in case of fragmented TLS
|
||||
records). (Abyl Valg, Jakub Zelenka)
|
||||
|
||||
- PDO_OCI:
|
||||
. Support Oracle Database tracing attributes ACTION, MODULE,
|
||||
CLIENT_INFO, and CLIENT_IDENTIFIER. (Cameron Porter)
|
||||
|
||||
- PHAR:
|
||||
. Fixed bug #77396 (Null Pointer Dereference in phar_create_or_parse_filename).
|
||||
(bishop)
|
||||
. Fixed bug #77586 (phar_tar_writeheaders_int() buffer overflow). (bishop)
|
||||
|
||||
- phpdbg:
|
||||
. Fixed bug #76596 (phpdbg support for display_errors=stderr). (kabel)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #51068 (DirectoryIterator glob:// don't support current path
|
||||
relative queries). (Ahmed Abdou)
|
||||
. Fixed bug #77431 (openFile() silently truncates after a null byte). (cmb)
|
||||
|
||||
- Standard:
|
||||
. Fixed bug #77552 (Unintialized php_stream_statbuf in stat functions).
|
||||
(John Stevenson)
|
||||
. Fixed bug #77612 (setcookie() sets incorrect SameSite header if all of its
|
||||
options filled). (Nikita)
|
||||
|
||||
07 Feb 2019, PHP 7.3.2
|
||||
|
||||
- Core:
|
||||
@@ -61,6 +124,8 @@ PHP NEWS
|
||||
(Nikita)
|
||||
. Fixed bug #77361 (configure fails on 64-bit AIX when opcache enabled).
|
||||
(Kevin Adler)
|
||||
. Fixed bug #77287 (Opcache literal compaction is incompatible with EXT
|
||||
opcodes). (Nikita)
|
||||
|
||||
- PCRE:
|
||||
. Fixed bug #77338 (get_browser with empty string). (Nikita)
|
||||
@@ -188,6 +253,7 @@ PHP NEWS
|
||||
. Removed support for BeOS. (Kalle)
|
||||
. Add PHP_VERSION to phpinfo() <title/>. (github/MattJeevas)
|
||||
. Add net_get_interfaces(). (Sara, Joe, Anatol)
|
||||
. Added gc_status(). (Benjamin Eberlei)
|
||||
. Implemented flexible heredoc and nowdoc syntax, per
|
||||
RFC https://wiki.php.net/rfc/flexible_heredoc_nowdoc_syntaxes.
|
||||
(Thomas Punt)
|
||||
|
||||
@@ -399,6 +399,8 @@ Core:
|
||||
platform, the function returns false.
|
||||
. Added net_get_interfaces() to retrieve an array of available network
|
||||
interfaces including several details.
|
||||
. Added the gc_status() function to retrieve status information regarding the
|
||||
cyclic GC.
|
||||
|
||||
Date:
|
||||
. Added the DateTime::createFromImmutable() method, which mirrors
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #77494 (Disabling class causes segfault on member access)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl")) exit("skip curl extension not loaded"); ?>
|
||||
--INI--
|
||||
disable_classes=CURLFile
|
||||
--FILE--
|
||||
<?php
|
||||
$a = new CURLFile();
|
||||
var_dump($a->name);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: CURLFile() has been disabled for security reasons in %sbug77494.php on line 2
|
||||
|
||||
Notice: Undefined property: CURLFile::$name in %sbug77494.php on line 3
|
||||
NULL
|
||||
@@ -0,0 +1,10 @@
|
||||
--TEST--
|
||||
Bug #77530: PHP crashes when parsing '(2)::class'
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
echo (2)::class;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Illegal class name in %s on line %d
|
||||
@@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
BUG #77589 (Core dump using parse_ini_string with numeric sections)
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(
|
||||
parse_ini_string(<<<INI
|
||||
[0]
|
||||
a = 1
|
||||
b = on
|
||||
c = true
|
||||
|
||||
["true"]
|
||||
a = 100
|
||||
b = null
|
||||
c = yes
|
||||
INI
|
||||
, TRUE, INI_SCANNER_TYPED));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
[0]=>
|
||||
array(3) {
|
||||
["a"]=>
|
||||
int(1)
|
||||
["b"]=>
|
||||
bool(true)
|
||||
["c"]=>
|
||||
bool(true)
|
||||
}
|
||||
["true"]=>
|
||||
array(3) {
|
||||
["a"]=>
|
||||
int(100)
|
||||
["b"]=>
|
||||
NULL
|
||||
["c"]=>
|
||||
bool(true)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Inherit internal static property into userland class
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('zend-test')) die('skip requires zend-test'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test extends _ZendTestClass {
|
||||
}
|
||||
|
||||
var_dump(Test::$_StaticProp);
|
||||
_ZendTestClass::$_StaticProp = 42;
|
||||
var_dump(Test::$_StaticProp);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
NULL
|
||||
int(42)
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
#ifndef ZEND_H
|
||||
#define ZEND_H
|
||||
|
||||
#define ZEND_VERSION "3.3.2RC1"
|
||||
#define ZEND_VERSION "3.3.3"
|
||||
|
||||
#define ZEND_ENGINE_3
|
||||
|
||||
|
||||
@@ -2861,6 +2861,17 @@ static zend_object *display_disabled_class(zend_class_entry *class_type) /* {{{
|
||||
zend_object *intern;
|
||||
|
||||
intern = zend_objects_new(class_type);
|
||||
|
||||
/* Initialize default properties */
|
||||
if (EXPECTED(class_type->default_properties_count != 0)) {
|
||||
zval *p = intern->properties_table;
|
||||
zval *end = p + class_type->default_properties_count;
|
||||
do {
|
||||
ZVAL_UNDEF(p);
|
||||
p++;
|
||||
} while (p != end);
|
||||
}
|
||||
|
||||
zend_error(E_WARNING, "%s() has been disabled for security reasons", ZSTR_VAL(class_type->name));
|
||||
return intern;
|
||||
}
|
||||
|
||||
+25
-25
@@ -726,7 +726,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
char *_error = NULL; \
|
||||
zend_bool _dummy; \
|
||||
zend_bool _optional = 0; \
|
||||
int _error_code = ZPP_ERROR_OK; \
|
||||
int error_code = ZPP_ERROR_OK; \
|
||||
((void)_i); \
|
||||
((void)_real_arg); \
|
||||
((void)_arg); \
|
||||
@@ -746,7 +746,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
zend_wrong_parameters_count_error(_min_num_args, _max_num_args); \
|
||||
} \
|
||||
} \
|
||||
_error_code = ZPP_ERROR_FAILURE; \
|
||||
error_code = ZPP_ERROR_FAILURE; \
|
||||
break; \
|
||||
} \
|
||||
_i = 0; \
|
||||
@@ -764,21 +764,21 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
|
||||
#define ZEND_PARSE_PARAMETERS_END_EX(failure) \
|
||||
} while (0); \
|
||||
if (UNEXPECTED(_error_code != ZPP_ERROR_OK)) { \
|
||||
if (UNEXPECTED(error_code != ZPP_ERROR_OK)) { \
|
||||
if (!(_flags & ZEND_PARSE_PARAMS_QUIET)) { \
|
||||
if (_error_code == ZPP_ERROR_WRONG_CALLBACK) { \
|
||||
if (error_code == ZPP_ERROR_WRONG_CALLBACK) { \
|
||||
if (_flags & ZEND_PARSE_PARAMS_THROW) { \
|
||||
zend_wrong_callback_exception(_i, _error); \
|
||||
} else { \
|
||||
zend_wrong_callback_error(_i, _error); \
|
||||
} \
|
||||
} else if (_error_code == ZPP_ERROR_WRONG_CLASS) { \
|
||||
} else if (error_code == ZPP_ERROR_WRONG_CLASS) { \
|
||||
if (_flags & ZEND_PARSE_PARAMS_THROW) { \
|
||||
zend_wrong_parameter_class_exception(_i, _error, _arg); \
|
||||
} else { \
|
||||
zend_wrong_parameter_class_error(_i, _error, _arg); \
|
||||
} \
|
||||
} else if (_error_code == ZPP_ERROR_WRONG_ARG) { \
|
||||
} else if (error_code == ZPP_ERROR_WRONG_ARG) { \
|
||||
if (_flags & ZEND_PARSE_PARAMS_THROW) { \
|
||||
zend_wrong_parameter_type_exception(_i, _expected_type, _arg); \
|
||||
} else { \
|
||||
@@ -818,7 +818,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_array(_arg, &dest, check_null, 0))) { \
|
||||
_expected_type = Z_EXPECTED_ARRAY; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -833,7 +833,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_array(_arg, &dest, check_null, 1))) { \
|
||||
_expected_type = Z_EXPECTED_ARRAY; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -848,7 +848,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_bool(_arg, &dest, &is_null, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_BOOL; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -862,7 +862,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
#define Z_PARAM_CLASS_EX2(dest, check_null, deref, separate) \
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_class(_arg, &dest, _i, check_null))) { \
|
||||
_error_code = ZPP_ERROR_FAILURE; \
|
||||
error_code = ZPP_ERROR_FAILURE; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -877,7 +877,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_double(_arg, &dest, &is_null, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_DOUBLE; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -893,10 +893,10 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
if (UNEXPECTED(!zend_parse_arg_func(_arg, &dest_fci, &dest_fcc, check_null, &_error))) { \
|
||||
if (!_error) { \
|
||||
_expected_type = Z_EXPECTED_FUNC; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
} else { \
|
||||
_error_code = ZPP_ERROR_WRONG_CALLBACK; \
|
||||
error_code = ZPP_ERROR_WRONG_CALLBACK; \
|
||||
break; \
|
||||
} \
|
||||
} else if (UNEXPECTED(_error != NULL)) { \
|
||||
@@ -914,7 +914,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_array_ht(_arg, &dest, check_null, 0, separate))) { \
|
||||
_expected_type = Z_EXPECTED_ARRAY; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -929,7 +929,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_array_ht(_arg, &dest, check_null, 1, separate))) { \
|
||||
_expected_type = Z_EXPECTED_ARRAY; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -944,7 +944,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_long(_arg, &dest, &is_null, check_null, 0))) { \
|
||||
_expected_type = Z_EXPECTED_LONG; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -959,7 +959,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_long(_arg, &dest, &is_null, check_null, 1))) { \
|
||||
_expected_type = Z_EXPECTED_LONG; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -974,7 +974,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_object(_arg, &dest, NULL, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_OBJECT; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -990,11 +990,11 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
if (UNEXPECTED(!zend_parse_arg_object(_arg, &dest, _ce, check_null))) { \
|
||||
if (_ce) { \
|
||||
_error = ZSTR_VAL((_ce)->name); \
|
||||
_error_code = ZPP_ERROR_WRONG_CLASS; \
|
||||
error_code = ZPP_ERROR_WRONG_CLASS; \
|
||||
break; \
|
||||
} else { \
|
||||
_expected_type = Z_EXPECTED_OBJECT; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
} \
|
||||
}
|
||||
@@ -1010,7 +1010,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_path(_arg, &dest, &dest_len, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_PATH; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -1025,7 +1025,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_path_str(_arg, &dest, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_PATH; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -1040,7 +1040,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_resource(_arg, &dest, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_RESOURCE; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -1055,7 +1055,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_string(_arg, &dest, &dest_len, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_STRING; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -1070,7 +1070,7 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_callback_exception(int num, cha
|
||||
Z_PARAM_PROLOGUE(deref, separate); \
|
||||
if (UNEXPECTED(!zend_parse_arg_str(_arg, &dest, check_null))) { \
|
||||
_expected_type = Z_EXPECTED_STRING; \
|
||||
_error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
error_code = ZPP_ERROR_WRONG_ARG; \
|
||||
break; \
|
||||
}
|
||||
|
||||
|
||||
+7
-8
@@ -191,9 +191,7 @@ typedef struct _zend_mm_free_slot zend_mm_free_slot;
|
||||
typedef struct _zend_mm_chunk zend_mm_chunk;
|
||||
typedef struct _zend_mm_huge_list zend_mm_huge_list;
|
||||
|
||||
#ifdef MAP_HUGETLB
|
||||
int zend_mm_use_huge_pages = 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Memory is retrived from OS by chunks of fixed size 2MB.
|
||||
@@ -714,7 +712,9 @@ static void *zend_mm_chunk_alloc_int(size_t size, size_t alignment)
|
||||
return NULL;
|
||||
} else if (ZEND_MM_ALIGNED_OFFSET(ptr, alignment) == 0) {
|
||||
#ifdef MADV_HUGEPAGE
|
||||
madvise(ptr, size, MADV_HUGEPAGE);
|
||||
if (zend_mm_use_huge_pages) {
|
||||
madvise(ptr, size, MADV_HUGEPAGE);
|
||||
}
|
||||
#endif
|
||||
return ptr;
|
||||
} else {
|
||||
@@ -745,7 +745,9 @@ static void *zend_mm_chunk_alloc_int(size_t size, size_t alignment)
|
||||
zend_mm_munmap((char*)ptr + size, alignment - REAL_PAGE_SIZE);
|
||||
}
|
||||
# ifdef MADV_HUGEPAGE
|
||||
madvise(ptr, size, MADV_HUGEPAGE);
|
||||
if (zend_mm_use_huge_pages) {
|
||||
madvise(ptr, size, MADV_HUGEPAGE);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
return ptr;
|
||||
@@ -2668,9 +2670,7 @@ ZEND_API void shutdown_memory_manager(int silent, int full_shutdown)
|
||||
|
||||
static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
|
||||
{
|
||||
#if ZEND_MM_CUSTOM || MAP_HUGETLB
|
||||
char *tmp;
|
||||
#endif
|
||||
|
||||
#if ZEND_MM_CUSTOM
|
||||
tmp = getenv("USE_ZEND_ALLOC");
|
||||
@@ -2684,12 +2684,11 @@ static void alloc_globals_ctor(zend_alloc_globals *alloc_globals)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef MAP_HUGETLB
|
||||
|
||||
tmp = getenv("USE_ZEND_ALLOC_HUGE_PAGES");
|
||||
if (tmp && zend_atoi(tmp, 0)) {
|
||||
zend_mm_use_huge_pages = 1;
|
||||
}
|
||||
#endif
|
||||
ZEND_TSRMLS_CACHE_UPDATE();
|
||||
alloc_globals->mm_heap = zend_mm_init();
|
||||
}
|
||||
|
||||
+22
-9
@@ -1480,6 +1480,7 @@ static void zend_ensure_valid_class_fetch_type(uint32_t fetch_type) /* {{{ */
|
||||
static zend_bool zend_try_compile_const_expr_resolve_class_name(zval *zv, zend_ast *class_ast, zend_ast *name_ast, zend_bool constant) /* {{{ */
|
||||
{
|
||||
uint32_t fetch_type;
|
||||
zval *class_name;
|
||||
|
||||
if (name_ast->kind != ZEND_AST_ZVAL) {
|
||||
return 0;
|
||||
@@ -1494,7 +1495,13 @@ static zend_bool zend_try_compile_const_expr_resolve_class_name(zval *zv, zend_a
|
||||
"Dynamic class names are not allowed in compile-time ::class fetch");
|
||||
}
|
||||
|
||||
fetch_type = zend_get_class_fetch_type(zend_ast_get_str(class_ast));
|
||||
class_name = zend_ast_get_zval(class_ast);
|
||||
|
||||
if (Z_TYPE_P(class_name) != IS_STRING) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Illegal class name");
|
||||
}
|
||||
|
||||
fetch_type = zend_get_class_fetch_type(Z_STR_P(class_name));
|
||||
zend_ensure_valid_class_fetch_type(fetch_type);
|
||||
|
||||
switch (fetch_type) {
|
||||
@@ -3651,7 +3658,7 @@ int zend_compile_func_cuf(znode *result, zend_ast_list *args, zend_string *lcnam
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int zend_compile_assert(znode *result, zend_ast_list *args, zend_string *name, zend_function *fbc) /* {{{ */
|
||||
static void zend_compile_assert(znode *result, zend_ast_list *args, zend_string *name, zend_function *fbc) /* {{{ */
|
||||
{
|
||||
if (EG(assertions) >= 0) {
|
||||
znode name_node;
|
||||
@@ -3694,8 +3701,6 @@ static int zend_compile_assert(znode *result, zend_ast_list *args, zend_string *
|
||||
result->op_type = IS_CONST;
|
||||
ZVAL_TRUE(&result->u.constant);
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -3902,10 +3907,6 @@ int zend_try_compile_special_func(znode *result, zend_string *lcname, zend_ast_l
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (zend_string_equals_literal(lcname, "assert")) {
|
||||
return zend_compile_assert(result, args, lcname, fbc);
|
||||
}
|
||||
|
||||
if (CG(compiler_options) & ZEND_COMPILE_NO_BUILTINS) {
|
||||
return FAILURE;
|
||||
}
|
||||
@@ -4008,8 +4009,16 @@ void zend_compile_call(znode *result, zend_ast *ast, uint32_t type) /* {{{ */
|
||||
zend_op *opline;
|
||||
|
||||
lcname = zend_string_tolower(Z_STR_P(name));
|
||||
|
||||
fbc = zend_hash_find_ptr(CG(function_table), lcname);
|
||||
|
||||
/* Special assert() handling should apply independently of compiler flags. */
|
||||
if (fbc && zend_string_equals_literal(lcname, "assert")) {
|
||||
zend_compile_assert(result, zend_ast_get_list(args_ast), lcname, fbc);
|
||||
zend_string_release(lcname);
|
||||
zval_ptr_dtor(&name_node.u.constant);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!fbc
|
||||
|| (fbc->type == ZEND_INTERNAL_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_INTERNAL_FUNCTIONS))
|
||||
|| (fbc->type == ZEND_USER_FUNCTION && (CG(compiler_options) & ZEND_COMPILE_IGNORE_USER_FUNCTIONS))
|
||||
@@ -4956,6 +4965,10 @@ static zend_uchar determine_switch_jumptable_type(zend_ast_list *cases) {
|
||||
}
|
||||
|
||||
static zend_bool should_use_jumptable(zend_ast_list *cases, zend_uchar jumptable_type) {
|
||||
if (CG(compiler_options) & ZEND_COMPILE_NO_JUMPTABLES) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Thresholds are chosen based on when the average switch time for equidistributed
|
||||
* input becomes smaller when using the jumptable optimization. */
|
||||
if (jumptable_type == IS_LONG) {
|
||||
|
||||
@@ -1048,6 +1048,9 @@ END_EXTERN_C()
|
||||
/* result of compilation may be stored in file cache */
|
||||
#define ZEND_COMPILE_WITH_FILE_CACHE (1<<11)
|
||||
|
||||
/* disable jumptable optimization for switch statements */
|
||||
#define ZEND_COMPILE_NO_JUMPTABLES (1<<12)
|
||||
|
||||
/* The default value for CG(compiler_options) */
|
||||
#define ZEND_COMPILE_DEFAULT ZEND_COMPILE_HANDLE_OP_ARRAY
|
||||
|
||||
|
||||
@@ -378,7 +378,9 @@ ZEND_API zval *zend_get_constant_ex(zend_string *cname, zend_class_entry *scope,
|
||||
ret_constant = NULL;
|
||||
} else {
|
||||
if (!zend_verify_const_access(c, scope)) {
|
||||
zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(class_name), ZSTR_VAL(constant_name));
|
||||
if ((flags & ZEND_FETCH_CLASS_SILENT) == 0) {
|
||||
zend_throw_error(NULL, "Cannot access %s const %s::%s", zend_visibility_string(Z_ACCESS_FLAGS(c->value)), ZSTR_VAL(class_name), ZSTR_VAL(constant_name));
|
||||
}
|
||||
goto failure;
|
||||
}
|
||||
ret_constant = &c->value;
|
||||
|
||||
@@ -894,6 +894,9 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
|
||||
}
|
||||
if (UNEXPECTED(parent_ce->type != ce->type)) {
|
||||
/* User class extends internal */
|
||||
if (CE_STATIC_MEMBERS(parent_ce) == NULL) {
|
||||
zend_class_init_statics(parent_ce);
|
||||
}
|
||||
if (UNEXPECTED(zend_update_class_constants(parent_ce) != SUCCESS)) {
|
||||
ZEND_ASSERT(0);
|
||||
}
|
||||
|
||||
+122
-121
@@ -143,13 +143,14 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals;
|
||||
ZVAL_NEW_STR(retval, zend_string_init(str, len, ZEND_SYSTEM_INI))
|
||||
|
||||
|
||||
#define RETURN_TOKEN(type, str, len) { \
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_TYPED) { \
|
||||
zend_ini_copy_typed_value(ini_lval, type, str, len); \
|
||||
} else { \
|
||||
zend_ini_copy_value(ini_lval, str, len); \
|
||||
} \
|
||||
return type; \
|
||||
#define RETURN_TOKEN(type, str, len) { \
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_TYPED && \
|
||||
(YYSTATE == STATE(ST_VALUE) || YYSTATE == STATE(ST_RAW))) {\
|
||||
zend_ini_copy_typed_value(ini_lval, type, str, len); \
|
||||
} else { \
|
||||
zend_ini_copy_value(ini_lval, str, len); \
|
||||
} \
|
||||
return type; \
|
||||
}
|
||||
|
||||
static inline int convert_to_number(zval *retval, const char *str, const int str_len)
|
||||
@@ -382,7 +383,7 @@ restart:
|
||||
}
|
||||
}
|
||||
|
||||
#line 386 "Zend/zend_ini_scanner.c"
|
||||
#line 387 "Zend/zend_ini_scanner.c"
|
||||
{
|
||||
YYCTYPE yych;
|
||||
unsigned int yyaccept = 0;
|
||||
@@ -504,7 +505,7 @@ yy4:
|
||||
yy5:
|
||||
YYDEBUG(5, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 481 "Zend/zend_ini_scanner.l"
|
||||
#line 482 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get option name */
|
||||
/* Eat leading whitespace */
|
||||
EAT_LEADING_WHITESPACE();
|
||||
@@ -514,7 +515,7 @@ yy5:
|
||||
|
||||
RETURN_TOKEN(TC_LABEL, yytext, yyleng);
|
||||
}
|
||||
#line 518 "Zend/zend_ini_scanner.c"
|
||||
#line 519 "Zend/zend_ini_scanner.c"
|
||||
yy6:
|
||||
YYDEBUG(6, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -538,24 +539,24 @@ yy6:
|
||||
yy8:
|
||||
YYDEBUG(8, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 634 "Zend/zend_ini_scanner.l"
|
||||
#line 635 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
/* eat whitespace */
|
||||
goto restart;
|
||||
}
|
||||
#line 547 "Zend/zend_ini_scanner.c"
|
||||
#line 548 "Zend/zend_ini_scanner.c"
|
||||
yy9:
|
||||
YYDEBUG(9, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
yy10:
|
||||
YYDEBUG(10, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 639 "Zend/zend_ini_scanner.l"
|
||||
#line 640 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 559 "Zend/zend_ini_scanner.c"
|
||||
#line 560 "Zend/zend_ini_scanner.c"
|
||||
yy11:
|
||||
YYDEBUG(11, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -616,11 +617,11 @@ yy14:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(15, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 562 "Zend/zend_ini_scanner.l"
|
||||
#line 563 "Zend/zend_ini_scanner.l"
|
||||
{ /* Disallow these chars outside option values */
|
||||
return yytext[0];
|
||||
}
|
||||
#line 624 "Zend/zend_ini_scanner.c"
|
||||
#line 625 "Zend/zend_ini_scanner.c"
|
||||
yy16:
|
||||
YYDEBUG(16, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -642,7 +643,7 @@ yy18:
|
||||
if (yych == ' ') goto yy18;
|
||||
YYDEBUG(20, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 491 "Zend/zend_ini_scanner.l"
|
||||
#line 492 "Zend/zend_ini_scanner.l"
|
||||
{ /* Start option value */
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW) {
|
||||
BEGIN(ST_RAW);
|
||||
@@ -651,7 +652,7 @@ yy18:
|
||||
}
|
||||
return '=';
|
||||
}
|
||||
#line 655 "Zend/zend_ini_scanner.c"
|
||||
#line 656 "Zend/zend_ini_scanner.c"
|
||||
yy21:
|
||||
YYDEBUG(21, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -707,7 +708,7 @@ yy26:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(27, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 406 "Zend/zend_ini_scanner.l"
|
||||
#line 407 "Zend/zend_ini_scanner.l"
|
||||
{ /* Section start */
|
||||
/* Enter section data lookup state */
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW) {
|
||||
@@ -717,7 +718,7 @@ yy26:
|
||||
}
|
||||
return TC_SECTION;
|
||||
}
|
||||
#line 721 "Zend/zend_ini_scanner.c"
|
||||
#line 722 "Zend/zend_ini_scanner.c"
|
||||
yy28:
|
||||
YYDEBUG(28, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -728,7 +729,7 @@ yy28:
|
||||
if (yych == ' ') goto yy28;
|
||||
YYDEBUG(30, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 431 "Zend/zend_ini_scanner.l"
|
||||
#line 432 "Zend/zend_ini_scanner.l"
|
||||
{ /* Start of option with offset */
|
||||
/* Eat leading whitespace */
|
||||
EAT_LEADING_WHITESPACE();
|
||||
@@ -741,20 +742,20 @@ yy28:
|
||||
|
||||
RETURN_TOKEN(TC_OFFSET, yytext, yyleng);
|
||||
}
|
||||
#line 745 "Zend/zend_ini_scanner.c"
|
||||
#line 746 "Zend/zend_ini_scanner.c"
|
||||
yy31:
|
||||
YYDEBUG(31, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
yy32:
|
||||
YYDEBUG(32, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 644 "Zend/zend_ini_scanner.l"
|
||||
#line 645 "Zend/zend_ini_scanner.l"
|
||||
{ /* Comment */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 758 "Zend/zend_ini_scanner.c"
|
||||
#line 759 "Zend/zend_ini_scanner.c"
|
||||
yy33:
|
||||
YYDEBUG(33, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -809,11 +810,11 @@ yy35:
|
||||
yy36:
|
||||
YYDEBUG(36, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 473 "Zend/zend_ini_scanner.l"
|
||||
#line 474 "Zend/zend_ini_scanner.l"
|
||||
{ /* FALSE value (when used outside option value/offset this causes parse error!)*/
|
||||
RETURN_TOKEN(BOOL_FALSE, "", 0);
|
||||
}
|
||||
#line 817 "Zend/zend_ini_scanner.c"
|
||||
#line 818 "Zend/zend_ini_scanner.c"
|
||||
yy37:
|
||||
YYDEBUG(37, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -870,11 +871,11 @@ yy39:
|
||||
yy41:
|
||||
YYDEBUG(41, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 469 "Zend/zend_ini_scanner.l"
|
||||
#line 470 "Zend/zend_ini_scanner.l"
|
||||
{ /* TRUE value (when used outside option value/offset this causes parse error!) */
|
||||
RETURN_TOKEN(BOOL_TRUE, "1", 1);
|
||||
}
|
||||
#line 878 "Zend/zend_ini_scanner.c"
|
||||
#line 879 "Zend/zend_ini_scanner.c"
|
||||
yy42:
|
||||
YYDEBUG(42, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -1021,11 +1022,11 @@ yy54:
|
||||
yy56:
|
||||
YYDEBUG(56, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 477 "Zend/zend_ini_scanner.l"
|
||||
#line 478 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
RETURN_TOKEN(NULL_NULL, "", 0);
|
||||
}
|
||||
#line 1029 "Zend/zend_ini_scanner.c"
|
||||
#line 1030 "Zend/zend_ini_scanner.c"
|
||||
yy57:
|
||||
YYDEBUG(57, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1134,11 +1135,11 @@ yy62:
|
||||
yy63:
|
||||
YYDEBUG(63, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 580 "Zend/zend_ini_scanner.l"
|
||||
#line 581 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get rest as section/offset value */
|
||||
RETURN_TOKEN(TC_STRING, yytext, yyleng);
|
||||
}
|
||||
#line 1142 "Zend/zend_ini_scanner.c"
|
||||
#line 1143 "Zend/zend_ini_scanner.c"
|
||||
yy64:
|
||||
YYDEBUG(64, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -1178,22 +1179,22 @@ yy66:
|
||||
yy67:
|
||||
YYDEBUG(67, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 655 "Zend/zend_ini_scanner.l"
|
||||
#line 656 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#line 1186 "Zend/zend_ini_scanner.c"
|
||||
#line 1187 "Zend/zend_ini_scanner.c"
|
||||
yy68:
|
||||
YYDEBUG(68, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(69, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 584 "Zend/zend_ini_scanner.l"
|
||||
#line 585 "Zend/zend_ini_scanner.l"
|
||||
{ /* Double quoted '"' string start */
|
||||
yy_push_state(ST_DOUBLE_QUOTES);
|
||||
return '"';
|
||||
}
|
||||
#line 1197 "Zend/zend_ini_scanner.c"
|
||||
#line 1198 "Zend/zend_ini_scanner.c"
|
||||
yy70:
|
||||
YYDEBUG(70, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -1258,11 +1259,11 @@ yy73:
|
||||
yy75:
|
||||
YYDEBUG(75, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 558 "Zend/zend_ini_scanner.l"
|
||||
#line 559 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get number option value as string */
|
||||
RETURN_TOKEN(TC_NUMBER, yytext, yyleng);
|
||||
}
|
||||
#line 1266 "Zend/zend_ini_scanner.c"
|
||||
#line 1267 "Zend/zend_ini_scanner.c"
|
||||
yy76:
|
||||
YYDEBUG(76, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -1295,11 +1296,11 @@ yy76:
|
||||
yy78:
|
||||
YYDEBUG(78, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 554 "Zend/zend_ini_scanner.l"
|
||||
#line 555 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get constant option value */
|
||||
RETURN_TOKEN(TC_CONSTANT, yytext, yyleng);
|
||||
}
|
||||
#line 1303 "Zend/zend_ini_scanner.c"
|
||||
#line 1304 "Zend/zend_ini_scanner.c"
|
||||
yy79:
|
||||
YYDEBUG(79, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1311,12 +1312,12 @@ yy80:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(81, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 444 "Zend/zend_ini_scanner.l"
|
||||
#line 445 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of section or an option offset */
|
||||
BEGIN(INITIAL);
|
||||
return ']';
|
||||
}
|
||||
#line 1320 "Zend/zend_ini_scanner.c"
|
||||
#line 1321 "Zend/zend_ini_scanner.c"
|
||||
yy82:
|
||||
YYDEBUG(82, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1356,12 +1357,12 @@ yy86:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(87, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 449 "Zend/zend_ini_scanner.l"
|
||||
#line 450 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable start */
|
||||
yy_push_state(ST_VARNAME);
|
||||
return TC_DOLLAR_CURLY;
|
||||
}
|
||||
#line 1365 "Zend/zend_ini_scanner.c"
|
||||
#line 1366 "Zend/zend_ini_scanner.c"
|
||||
yy88:
|
||||
YYDEBUG(88, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1415,7 +1416,7 @@ yy92:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(93, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 416 "Zend/zend_ini_scanner.l"
|
||||
#line 417 "Zend/zend_ini_scanner.l"
|
||||
{ /* Raw string */
|
||||
/* Eat leading and trailing single quotes */
|
||||
if (yytext[0] == '\'' && yytext[yyleng - 1] == '\'') {
|
||||
@@ -1424,7 +1425,7 @@ yy92:
|
||||
}
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
#line 1428 "Zend/zend_ini_scanner.c"
|
||||
#line 1429 "Zend/zend_ini_scanner.c"
|
||||
}
|
||||
/* *********************************** */
|
||||
yyc_ST_SECTION_VALUE:
|
||||
@@ -1524,11 +1525,11 @@ yy97:
|
||||
yy98:
|
||||
YYDEBUG(98, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 580 "Zend/zend_ini_scanner.l"
|
||||
#line 581 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get rest as section/offset value */
|
||||
RETURN_TOKEN(TC_STRING, yytext, yyleng);
|
||||
}
|
||||
#line 1532 "Zend/zend_ini_scanner.c"
|
||||
#line 1533 "Zend/zend_ini_scanner.c"
|
||||
yy99:
|
||||
YYDEBUG(99, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -1568,22 +1569,22 @@ yy101:
|
||||
yy102:
|
||||
YYDEBUG(102, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 655 "Zend/zend_ini_scanner.l"
|
||||
#line 656 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#line 1576 "Zend/zend_ini_scanner.c"
|
||||
#line 1577 "Zend/zend_ini_scanner.c"
|
||||
yy103:
|
||||
YYDEBUG(103, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(104, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 584 "Zend/zend_ini_scanner.l"
|
||||
#line 585 "Zend/zend_ini_scanner.l"
|
||||
{ /* Double quoted '"' string start */
|
||||
yy_push_state(ST_DOUBLE_QUOTES);
|
||||
return '"';
|
||||
}
|
||||
#line 1587 "Zend/zend_ini_scanner.c"
|
||||
#line 1588 "Zend/zend_ini_scanner.c"
|
||||
yy105:
|
||||
YYDEBUG(105, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -1648,11 +1649,11 @@ yy108:
|
||||
yy110:
|
||||
YYDEBUG(110, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 558 "Zend/zend_ini_scanner.l"
|
||||
#line 559 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get number option value as string */
|
||||
RETURN_TOKEN(TC_NUMBER, yytext, yyleng);
|
||||
}
|
||||
#line 1656 "Zend/zend_ini_scanner.c"
|
||||
#line 1657 "Zend/zend_ini_scanner.c"
|
||||
yy111:
|
||||
YYDEBUG(111, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -1685,11 +1686,11 @@ yy111:
|
||||
yy113:
|
||||
YYDEBUG(113, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 554 "Zend/zend_ini_scanner.l"
|
||||
#line 555 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get constant option value */
|
||||
RETURN_TOKEN(TC_CONSTANT, yytext, yyleng);
|
||||
}
|
||||
#line 1693 "Zend/zend_ini_scanner.c"
|
||||
#line 1694 "Zend/zend_ini_scanner.c"
|
||||
yy114:
|
||||
YYDEBUG(114, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1713,13 +1714,13 @@ yy115:
|
||||
yy117:
|
||||
YYDEBUG(117, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 425 "Zend/zend_ini_scanner.l"
|
||||
#line 426 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of section */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return ']';
|
||||
}
|
||||
#line 1723 "Zend/zend_ini_scanner.c"
|
||||
#line 1724 "Zend/zend_ini_scanner.c"
|
||||
yy118:
|
||||
YYDEBUG(118, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1759,12 +1760,12 @@ yy122:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(123, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 449 "Zend/zend_ini_scanner.l"
|
||||
#line 450 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable start */
|
||||
yy_push_state(ST_VARNAME);
|
||||
return TC_DOLLAR_CURLY;
|
||||
}
|
||||
#line 1768 "Zend/zend_ini_scanner.c"
|
||||
#line 1769 "Zend/zend_ini_scanner.c"
|
||||
yy124:
|
||||
YYDEBUG(124, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -1827,7 +1828,7 @@ yy130:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(131, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 416 "Zend/zend_ini_scanner.l"
|
||||
#line 417 "Zend/zend_ini_scanner.l"
|
||||
{ /* Raw string */
|
||||
/* Eat leading and trailing single quotes */
|
||||
if (yytext[0] == '\'' && yytext[yyleng - 1] == '\'') {
|
||||
@@ -1836,7 +1837,7 @@ yy130:
|
||||
}
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
#line 1840 "Zend/zend_ini_scanner.c"
|
||||
#line 1841 "Zend/zend_ini_scanner.c"
|
||||
}
|
||||
/* *********************************** */
|
||||
yyc_ST_VALUE:
|
||||
@@ -1972,12 +1973,12 @@ yy134:
|
||||
yy135:
|
||||
YYDEBUG(135, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 650 "Zend/zend_ini_scanner.l"
|
||||
#line 651 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of option value (if EOF is reached before EOL */
|
||||
BEGIN(INITIAL);
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 1981 "Zend/zend_ini_scanner.c"
|
||||
#line 1982 "Zend/zend_ini_scanner.c"
|
||||
yy136:
|
||||
YYDEBUG(136, *YYCURSOR);
|
||||
yyaccept = 0;
|
||||
@@ -1994,11 +1995,11 @@ yy137:
|
||||
yy138:
|
||||
YYDEBUG(138, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 576 "Zend/zend_ini_scanner.l"
|
||||
#line 577 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get everything else as option/offset value */
|
||||
RETURN_TOKEN(TC_STRING, yytext, yyleng);
|
||||
}
|
||||
#line 2002 "Zend/zend_ini_scanner.c"
|
||||
#line 2003 "Zend/zend_ini_scanner.c"
|
||||
yy139:
|
||||
YYDEBUG(139, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -2022,24 +2023,24 @@ yy139:
|
||||
yy141:
|
||||
YYDEBUG(141, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 630 "Zend/zend_ini_scanner.l"
|
||||
#line 631 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
RETURN_TOKEN(TC_WHITESPACE, yytext, yyleng);
|
||||
}
|
||||
#line 2030 "Zend/zend_ini_scanner.c"
|
||||
#line 2031 "Zend/zend_ini_scanner.c"
|
||||
yy142:
|
||||
YYDEBUG(142, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
yy143:
|
||||
YYDEBUG(143, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 548 "Zend/zend_ini_scanner.l"
|
||||
#line 549 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of option value */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 2043 "Zend/zend_ini_scanner.c"
|
||||
#line 2044 "Zend/zend_ini_scanner.c"
|
||||
yy144:
|
||||
YYDEBUG(144, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2055,22 +2056,22 @@ yy145:
|
||||
if (yych == ' ') goto yy145;
|
||||
YYDEBUG(147, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 566 "Zend/zend_ini_scanner.l"
|
||||
#line 567 "Zend/zend_ini_scanner.l"
|
||||
{ /* Boolean operators */
|
||||
return yytext[0];
|
||||
}
|
||||
#line 2063 "Zend/zend_ini_scanner.c"
|
||||
#line 2064 "Zend/zend_ini_scanner.c"
|
||||
yy148:
|
||||
YYDEBUG(148, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(149, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 584 "Zend/zend_ini_scanner.l"
|
||||
#line 585 "Zend/zend_ini_scanner.l"
|
||||
{ /* Double quoted '"' string start */
|
||||
yy_push_state(ST_DOUBLE_QUOTES);
|
||||
return '"';
|
||||
}
|
||||
#line 2074 "Zend/zend_ini_scanner.c"
|
||||
#line 2075 "Zend/zend_ini_scanner.c"
|
||||
yy150:
|
||||
YYDEBUG(150, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2144,11 +2145,11 @@ yy153:
|
||||
yy155:
|
||||
YYDEBUG(155, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 558 "Zend/zend_ini_scanner.l"
|
||||
#line 559 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get number option value as string */
|
||||
RETURN_TOKEN(TC_NUMBER, yytext, yyleng);
|
||||
}
|
||||
#line 2152 "Zend/zend_ini_scanner.c"
|
||||
#line 2153 "Zend/zend_ini_scanner.c"
|
||||
yy156:
|
||||
YYDEBUG(156, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -2165,13 +2166,13 @@ yy158:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(159, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 570 "Zend/zend_ini_scanner.l"
|
||||
#line 571 "Zend/zend_ini_scanner.l"
|
||||
{ /* Make = used in option value to trigger error */
|
||||
yyless(0);
|
||||
BEGIN(INITIAL);
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 2175 "Zend/zend_ini_scanner.c"
|
||||
#line 2176 "Zend/zend_ini_scanner.c"
|
||||
yy160:
|
||||
YYDEBUG(160, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -2218,11 +2219,11 @@ yy160:
|
||||
yy162:
|
||||
YYDEBUG(162, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 554 "Zend/zend_ini_scanner.l"
|
||||
#line 555 "Zend/zend_ini_scanner.l"
|
||||
{ /* Get constant option value */
|
||||
RETURN_TOKEN(TC_CONSTANT, yytext, yyleng);
|
||||
}
|
||||
#line 2226 "Zend/zend_ini_scanner.c"
|
||||
#line 2227 "Zend/zend_ini_scanner.c"
|
||||
yy163:
|
||||
YYDEBUG(163, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -2556,12 +2557,12 @@ yy171:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(172, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 449 "Zend/zend_ini_scanner.l"
|
||||
#line 450 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable start */
|
||||
yy_push_state(ST_VARNAME);
|
||||
return TC_DOLLAR_CURLY;
|
||||
}
|
||||
#line 2565 "Zend/zend_ini_scanner.c"
|
||||
#line 2566 "Zend/zend_ini_scanner.c"
|
||||
yy173:
|
||||
YYDEBUG(173, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -2627,13 +2628,13 @@ yy177:
|
||||
yy178:
|
||||
YYDEBUG(178, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 644 "Zend/zend_ini_scanner.l"
|
||||
#line 645 "Zend/zend_ini_scanner.l"
|
||||
{ /* Comment */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 2637 "Zend/zend_ini_scanner.c"
|
||||
#line 2638 "Zend/zend_ini_scanner.c"
|
||||
yy179:
|
||||
YYDEBUG(179, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -2744,11 +2745,11 @@ yy181:
|
||||
yy182:
|
||||
YYDEBUG(182, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 473 "Zend/zend_ini_scanner.l"
|
||||
#line 474 "Zend/zend_ini_scanner.l"
|
||||
{ /* FALSE value (when used outside option value/offset this causes parse error!)*/
|
||||
RETURN_TOKEN(BOOL_FALSE, "", 0);
|
||||
}
|
||||
#line 2752 "Zend/zend_ini_scanner.c"
|
||||
#line 2753 "Zend/zend_ini_scanner.c"
|
||||
yy183:
|
||||
YYDEBUG(183, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -2895,11 +2896,11 @@ yy185:
|
||||
yy186:
|
||||
YYDEBUG(186, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 469 "Zend/zend_ini_scanner.l"
|
||||
#line 470 "Zend/zend_ini_scanner.l"
|
||||
{ /* TRUE value (when used outside option value/offset this causes parse error!) */
|
||||
RETURN_TOKEN(BOOL_TRUE, "1", 1);
|
||||
}
|
||||
#line 2903 "Zend/zend_ini_scanner.c"
|
||||
#line 2904 "Zend/zend_ini_scanner.c"
|
||||
yy187:
|
||||
YYDEBUG(187, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -3019,7 +3020,7 @@ yy191:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(192, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 416 "Zend/zend_ini_scanner.l"
|
||||
#line 417 "Zend/zend_ini_scanner.l"
|
||||
{ /* Raw string */
|
||||
/* Eat leading and trailing single quotes */
|
||||
if (yytext[0] == '\'' && yytext[yyleng - 1] == '\'') {
|
||||
@@ -3028,7 +3029,7 @@ yy191:
|
||||
}
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
#line 3032 "Zend/zend_ini_scanner.c"
|
||||
#line 3033 "Zend/zend_ini_scanner.c"
|
||||
yy193:
|
||||
YYDEBUG(193, *YYCURSOR);
|
||||
yyaccept = 2;
|
||||
@@ -3343,11 +3344,11 @@ yy202:
|
||||
yy203:
|
||||
YYDEBUG(203, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 477 "Zend/zend_ini_scanner.l"
|
||||
#line 478 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
RETURN_TOKEN(NULL_NULL, "", 0);
|
||||
}
|
||||
#line 3351 "Zend/zend_ini_scanner.c"
|
||||
#line 3352 "Zend/zend_ini_scanner.c"
|
||||
yy204:
|
||||
YYDEBUG(204, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -3414,21 +3415,21 @@ yy208:
|
||||
}
|
||||
YYDEBUG(210, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 544 "Zend/zend_ini_scanner.l"
|
||||
#line 545 "Zend/zend_ini_scanner.l"
|
||||
{ /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
#line 3422 "Zend/zend_ini_scanner.c"
|
||||
#line 3423 "Zend/zend_ini_scanner.c"
|
||||
yy211:
|
||||
YYDEBUG(211, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(212, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 655 "Zend/zend_ini_scanner.l"
|
||||
#line 656 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#line 3432 "Zend/zend_ini_scanner.c"
|
||||
#line 3433 "Zend/zend_ini_scanner.c"
|
||||
yy213:
|
||||
YYDEBUG(213, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -3444,13 +3445,13 @@ yy213:
|
||||
yy215:
|
||||
YYDEBUG(215, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 425 "Zend/zend_ini_scanner.l"
|
||||
#line 426 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of section */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return ']';
|
||||
}
|
||||
#line 3454 "Zend/zend_ini_scanner.c"
|
||||
#line 3455 "Zend/zend_ini_scanner.c"
|
||||
yy216:
|
||||
YYDEBUG(216, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -3508,7 +3509,7 @@ yyc_ST_DOUBLE_QUOTES:
|
||||
yy221:
|
||||
YYDEBUG(221, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 594 "Zend/zend_ini_scanner.l"
|
||||
#line 595 "Zend/zend_ini_scanner.l"
|
||||
{ /* Escape double quoted string contents */
|
||||
if (YYCURSOR > YYLIMIT) {
|
||||
return 0;
|
||||
@@ -3544,7 +3545,7 @@ yy221:
|
||||
zend_ini_escape_string(ini_lval, yytext, yyleng, '"');
|
||||
return TC_QUOTED_STRING;
|
||||
}
|
||||
#line 3548 "Zend/zend_ini_scanner.c"
|
||||
#line 3549 "Zend/zend_ini_scanner.c"
|
||||
yy222:
|
||||
YYDEBUG(222, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
@@ -3556,12 +3557,12 @@ yy222:
|
||||
}
|
||||
YYDEBUG(224, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 589 "Zend/zend_ini_scanner.l"
|
||||
#line 590 "Zend/zend_ini_scanner.l"
|
||||
{ /* Double quoted '"' string ends */
|
||||
yy_pop_state();
|
||||
return '"';
|
||||
}
|
||||
#line 3565 "Zend/zend_ini_scanner.c"
|
||||
#line 3566 "Zend/zend_ini_scanner.c"
|
||||
yy225:
|
||||
YYDEBUG(225, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3570,12 +3571,12 @@ yy225:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(227, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 449 "Zend/zend_ini_scanner.l"
|
||||
#line 450 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable start */
|
||||
yy_push_state(ST_VARNAME);
|
||||
return TC_DOLLAR_CURLY;
|
||||
}
|
||||
#line 3579 "Zend/zend_ini_scanner.c"
|
||||
#line 3580 "Zend/zend_ini_scanner.c"
|
||||
}
|
||||
/* *********************************** */
|
||||
yyc_ST_VARNAME:
|
||||
@@ -3633,7 +3634,7 @@ yy230:
|
||||
}
|
||||
YYDEBUG(232, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 454 "Zend/zend_ini_scanner.l"
|
||||
#line 455 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable name */
|
||||
/* Eat leading whitespace */
|
||||
EAT_LEADING_WHITESPACE();
|
||||
@@ -3643,28 +3644,28 @@ yy230:
|
||||
|
||||
RETURN_TOKEN(TC_VARNAME, yytext, yyleng);
|
||||
}
|
||||
#line 3647 "Zend/zend_ini_scanner.c"
|
||||
#line 3648 "Zend/zend_ini_scanner.c"
|
||||
yy233:
|
||||
YYDEBUG(233, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(234, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 655 "Zend/zend_ini_scanner.l"
|
||||
#line 656 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#line 3657 "Zend/zend_ini_scanner.c"
|
||||
#line 3658 "Zend/zend_ini_scanner.c"
|
||||
yy235:
|
||||
YYDEBUG(235, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
YYDEBUG(236, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 464 "Zend/zend_ini_scanner.l"
|
||||
#line 465 "Zend/zend_ini_scanner.l"
|
||||
{ /* Variable end */
|
||||
yy_pop_state();
|
||||
return '}';
|
||||
}
|
||||
#line 3668 "Zend/zend_ini_scanner.c"
|
||||
#line 3669 "Zend/zend_ini_scanner.c"
|
||||
}
|
||||
/* *********************************** */
|
||||
yyc_ST_RAW:
|
||||
@@ -3728,19 +3729,19 @@ yyc_ST_RAW:
|
||||
++YYCURSOR;
|
||||
YYDEBUG(240, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 650 "Zend/zend_ini_scanner.l"
|
||||
#line 651 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of option value (if EOF is reached before EOL */
|
||||
BEGIN(INITIAL);
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 3737 "Zend/zend_ini_scanner.c"
|
||||
#line 3738 "Zend/zend_ini_scanner.c"
|
||||
yy241:
|
||||
YYDEBUG(241, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
yy242:
|
||||
YYDEBUG(242, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 500 "Zend/zend_ini_scanner.l"
|
||||
#line 501 "Zend/zend_ini_scanner.l"
|
||||
{ /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
|
||||
unsigned char *sc = NULL;
|
||||
EAT_LEADING_WHITESPACE();
|
||||
@@ -3784,7 +3785,7 @@ end_raw_value_chars:
|
||||
|
||||
RETURN_TOKEN(TC_RAW, yytext, yyleng);
|
||||
}
|
||||
#line 3788 "Zend/zend_ini_scanner.c"
|
||||
#line 3789 "Zend/zend_ini_scanner.c"
|
||||
yy243:
|
||||
YYDEBUG(243, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3808,13 +3809,13 @@ yy244:
|
||||
yy245:
|
||||
YYDEBUG(245, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 548 "Zend/zend_ini_scanner.l"
|
||||
#line 549 "Zend/zend_ini_scanner.l"
|
||||
{ /* End of option value */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 3818 "Zend/zend_ini_scanner.c"
|
||||
#line 3819 "Zend/zend_ini_scanner.c"
|
||||
yy246:
|
||||
YYDEBUG(246, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3851,25 +3852,25 @@ yy250:
|
||||
yy251:
|
||||
YYDEBUG(251, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 634 "Zend/zend_ini_scanner.l"
|
||||
#line 635 "Zend/zend_ini_scanner.l"
|
||||
{
|
||||
/* eat whitespace */
|
||||
goto restart;
|
||||
}
|
||||
#line 3860 "Zend/zend_ini_scanner.c"
|
||||
#line 3861 "Zend/zend_ini_scanner.c"
|
||||
yy252:
|
||||
YYDEBUG(252, *YYCURSOR);
|
||||
++YYCURSOR;
|
||||
yy253:
|
||||
YYDEBUG(253, *YYCURSOR);
|
||||
yyleng = YYCURSOR - SCNG(yy_text);
|
||||
#line 644 "Zend/zend_ini_scanner.l"
|
||||
#line 645 "Zend/zend_ini_scanner.l"
|
||||
{ /* Comment */
|
||||
BEGIN(INITIAL);
|
||||
SCNG(lineno)++;
|
||||
return END_OF_LINE;
|
||||
}
|
||||
#line 3873 "Zend/zend_ini_scanner.c"
|
||||
#line 3874 "Zend/zend_ini_scanner.c"
|
||||
yy254:
|
||||
YYDEBUG(254, *YYCURSOR);
|
||||
yych = *++YYCURSOR;
|
||||
@@ -3877,6 +3878,6 @@ yy254:
|
||||
goto yy253;
|
||||
}
|
||||
}
|
||||
#line 659 "Zend/zend_ini_scanner.l"
|
||||
#line 660 "Zend/zend_ini_scanner.l"
|
||||
|
||||
}
|
||||
@@ -140,13 +140,14 @@ ZEND_API zend_ini_scanner_globals ini_scanner_globals;
|
||||
ZVAL_NEW_STR(retval, zend_string_init(str, len, ZEND_SYSTEM_INI))
|
||||
|
||||
|
||||
#define RETURN_TOKEN(type, str, len) { \
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_TYPED) { \
|
||||
zend_ini_copy_typed_value(ini_lval, type, str, len); \
|
||||
} else { \
|
||||
zend_ini_copy_value(ini_lval, str, len); \
|
||||
} \
|
||||
return type; \
|
||||
#define RETURN_TOKEN(type, str, len) { \
|
||||
if (SCNG(scanner_mode) == ZEND_INI_SCANNER_TYPED && \
|
||||
(YYSTATE == STATE(ST_VALUE) || YYSTATE == STATE(ST_RAW))) {\
|
||||
zend_ini_copy_typed_value(ini_lval, type, str, len); \
|
||||
} else { \
|
||||
zend_ini_copy_value(ini_lval, str, len); \
|
||||
} \
|
||||
return type; \
|
||||
}
|
||||
|
||||
static inline int convert_to_number(zval *retval, const char *str, const int str_len)
|
||||
|
||||
@@ -1374,14 +1374,14 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_st
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void zend_intenal_class_init_statics(zend_class_entry *class_type) /* {{{ */
|
||||
ZEND_API void zend_class_init_statics(zend_class_entry *class_type) /* {{{ */
|
||||
{
|
||||
int i;
|
||||
zval *p;
|
||||
|
||||
if (!CE_STATIC_MEMBERS(class_type) && class_type->default_static_members_count) {
|
||||
if (class_type->parent) {
|
||||
zend_intenal_class_init_statics(class_type->parent);
|
||||
zend_class_init_statics(class_type->parent);
|
||||
}
|
||||
|
||||
#if ZTS
|
||||
@@ -1431,7 +1431,7 @@ ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *p
|
||||
/* check if static properties were destoyed */
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
|
||||
if (ce->type == ZEND_INTERNAL_CLASS) {
|
||||
zend_intenal_class_init_statics(ce);
|
||||
zend_class_init_statics(ce);
|
||||
} else {
|
||||
undeclared_property:
|
||||
if (!silent) {
|
||||
|
||||
@@ -175,6 +175,7 @@ extern const ZEND_API zend_object_handlers std_object_handlers;
|
||||
#define ZEND_PROPERTY_NOT_EMPTY ZEND_ISEMPTY /* Property is not empty */
|
||||
#define ZEND_PROPERTY_EXISTS 0x2 /* Property exists */
|
||||
|
||||
ZEND_API void zend_class_init_statics(zend_class_entry *ce);
|
||||
ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, zend_string *function_name_strval, const zval *key);
|
||||
ZEND_API zval *zend_std_get_static_property(zend_class_entry *ce, zend_string *property_name, zend_bool silent);
|
||||
ZEND_API ZEND_COLD zend_bool zend_std_unset_static_property(zend_class_entry *ce, zend_string *property_name);
|
||||
|
||||
@@ -577,7 +577,7 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */
|
||||
# define ZEND_INTRIN_SSSE3_FUNC_DECL(func)
|
||||
#endif
|
||||
|
||||
#ifdef __SSE4_2__
|
||||
#if defined(HAVE_SSE4_2_DEF) || (defined(ZEND_WIN32) && defined(__SSE4_2__))
|
||||
/* Instructions compiled directly. */
|
||||
# define ZEND_INTRIN_SSE4_2_NATIVE 1
|
||||
#elif (defined(HAVE_FUNC_ATTRIBUTE_TARGET) && defined(PHP_HAVE_SSE4_2)) || defined(ZEND_WIN32)
|
||||
|
||||
@@ -155,7 +155,12 @@ ZEND_API void ZEND_FASTCALL _smart_string_alloc(smart_string *str, size_t len)
|
||||
str->c = emalloc(SMART_STRING_START_LEN + 1);
|
||||
} else {
|
||||
str->a = ZEND_MM_ALIGNED_SIZE_EX(len + SMART_STRING_OVERHEAD, SMART_STRING_PAGE) - SMART_STRING_OVERHEAD;
|
||||
str->c = emalloc_large(str->a + 1);
|
||||
if (EXPECTED(str->a < (ZEND_MM_CHUNK_SIZE - SMART_STRING_OVERHEAD))) {
|
||||
str->c = emalloc_large(str->a + 1);
|
||||
} else {
|
||||
/* allocate a huge chunk */
|
||||
str->c = emalloc(str->a + 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) {
|
||||
|
||||
+70
-36
@@ -2173,50 +2173,84 @@ AC_DEFUN([PHP_SETUP_ICU],[
|
||||
PHP_ICU_DIR=DEFAULT
|
||||
fi
|
||||
|
||||
if test "$PHP_ICU_DIR" = "DEFAULT"; then
|
||||
dnl Try to find icu-config
|
||||
AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
|
||||
else
|
||||
ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
|
||||
AC_MSG_CHECKING([for location of ICU headers and libraries])
|
||||
found_icu=no
|
||||
|
||||
dnl First try to find pkg-config
|
||||
if test -z "$PKG_CONFIG"; then
|
||||
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for location of ICU headers and libraries])
|
||||
dnl If pkg-config is found try using it
|
||||
if test "$PHP_ICU_DIR" = "DEFAULT" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists icu-uc icu-io icu-i18n; then
|
||||
if $PKG_CONFIG --atleast-version=40 icu-uc; then
|
||||
found_icu=yes
|
||||
icu_version_full=`$PKG_CONFIG --modversion icu-uc`
|
||||
ac_IFS=$IFS
|
||||
IFS="."
|
||||
set $icu_version_full
|
||||
IFS=$ac_IFS
|
||||
icu_version=`expr [$]1 \* 1000 + [$]2`
|
||||
AC_MSG_RESULT([found $icu_version_full])
|
||||
|
||||
dnl Trust icu-config to know better what the install prefix is..
|
||||
icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
|
||||
if test "$?" != "0" || test -z "$icu_install_prefix"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
|
||||
else
|
||||
AC_MSG_RESULT([$icu_install_prefix])
|
||||
ICU_LIBS=`$PKG_CONFIG --libs icu-uc icu-io icu-i18n`
|
||||
ICU_INCS=`$PKG_CONFIG --cflags-only-I icu-uc icu-io icu-i18n`
|
||||
ICU_CXXFLAGS="-DU_USING_ICU_NAMESPACE=1"
|
||||
|
||||
dnl Check ICU version
|
||||
AC_MSG_CHECKING([for ICU 4.0 or greater])
|
||||
icu_version_full=`$ICU_CONFIG --version`
|
||||
ac_IFS=$IFS
|
||||
IFS="."
|
||||
set $icu_version_full
|
||||
IFS=$ac_IFS
|
||||
icu_version=`expr [$]1 \* 1000 + [$]2`
|
||||
AC_MSG_RESULT([found $icu_version_full])
|
||||
AC_MSG_RESULT([found $ICU_VERSION])
|
||||
|
||||
if test "$icu_version" -lt "4000"; then
|
||||
AC_MSG_ERROR([ICU version 4.0 or later is required])
|
||||
PHP_EVAL_LIBLINE($ICU_LIBS, $1)
|
||||
PHP_EVAL_INCLINE($ICU_INCS)
|
||||
else
|
||||
AC_MSG_ERROR([ICU version 4.0 or later required.])
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl If pkg-config fails for some reason, revert to the old method
|
||||
if test "$found_icu" = "no"; then
|
||||
if test "$PHP_ICU_DIR" = "DEFAULT"; then
|
||||
dnl Try to find icu-config
|
||||
AC_PATH_PROG(ICU_CONFIG, icu-config, no, [$PATH:/usr/local/bin])
|
||||
else
|
||||
ICU_CONFIG="$PHP_ICU_DIR/bin/icu-config"
|
||||
fi
|
||||
|
||||
ICU_VERSION=$icu_version
|
||||
ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
|
||||
ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
|
||||
PHP_EVAL_INCLINE($ICU_INCS)
|
||||
PHP_EVAL_LIBLINE($ICU_LIBS, $1)
|
||||
dnl Trust icu-config to know better what the install prefix is..
|
||||
icu_install_prefix=`$ICU_CONFIG --prefix 2> /dev/null`
|
||||
if test "$?" != "0" || test -z "$icu_install_prefix"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([Unable to detect ICU prefix or $ICU_CONFIG failed. Please verify ICU install prefix and make sure icu-config works.])
|
||||
else
|
||||
AC_MSG_RESULT([$icu_install_prefix])
|
||||
|
||||
ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
|
||||
if test "$icu_version" -ge "49000"; then
|
||||
ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
|
||||
ICU_CFLAGS="-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
|
||||
fi
|
||||
if test "$icu_version" -ge "60000"; then
|
||||
ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
|
||||
dnl Check ICU version
|
||||
AC_MSG_CHECKING([for ICU 4.0 or greater])
|
||||
icu_version_full=`$ICU_CONFIG --version`
|
||||
ac_IFS=$IFS
|
||||
IFS="."
|
||||
set $icu_version_full
|
||||
IFS=$ac_IFS
|
||||
icu_version=`expr [$]1 \* 1000 + [$]2`
|
||||
AC_MSG_RESULT([found $icu_version_full])
|
||||
|
||||
if test "$icu_version" -lt "4000"; then
|
||||
AC_MSG_ERROR([ICU version 4.0 or later is required])
|
||||
fi
|
||||
|
||||
ICU_VERSION=$icu_version
|
||||
ICU_INCS=`$ICU_CONFIG --cppflags-searchpath`
|
||||
ICU_LIBS=`$ICU_CONFIG --ldflags --ldflags-icuio`
|
||||
PHP_EVAL_INCLINE($ICU_INCS)
|
||||
PHP_EVAL_LIBLINE($ICU_LIBS, $1)
|
||||
|
||||
ICU_CXXFLAGS=`$ICU_CONFIG --cxxflags`
|
||||
if test "$icu_version" -ge "49000"; then
|
||||
ICU_CXXFLAGS="$ICU_CXXFLAGS -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit"
|
||||
ICU_CFLAGS="-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
|
||||
fi
|
||||
if test "$icu_version" -ge "60000"; then
|
||||
ICU_CFLAGS="$ICU_CFLAGS -DU_HIDE_OBSOLETE_UTF_OLD_H=1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
+20
-2
@@ -107,8 +107,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
|
||||
|
||||
PHP_MAJOR_VERSION=7
|
||||
PHP_MINOR_VERSION=3
|
||||
PHP_RELEASE_VERSION=2
|
||||
PHP_EXTRA_VERSION="RC1"
|
||||
PHP_RELEASE_VERSION=3
|
||||
PHP_EXTRA_VERSION=""
|
||||
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
|
||||
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
|
||||
|
||||
@@ -565,6 +565,24 @@ PHP_CHECK_CPU_SUPPORTS([sse4.2])
|
||||
PHP_CHECK_CPU_SUPPORTS([avx])
|
||||
PHP_CHECK_CPU_SUPPORTS([avx2])
|
||||
|
||||
dnl The ABI of php_addslashes in PHP 7.3 is dependent on __SSE4_2__,
|
||||
dnl which depends on target attributes. Use this check to make sure that
|
||||
dnl SSE 4.2 availability during the PHP compilation is used, independently
|
||||
dnl of whether extensions are compiled with SSE 4.2 support.
|
||||
AC_MSG_CHECKING([whether __SSE4_2__ is defined])
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
int main() {
|
||||
#if defined(__SSE4_2__)
|
||||
return 0;
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
]])], [
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_DEFINE(HAVE_SSE4_2_DEF, 1, [Define if __SSE4_2__ has been defined])
|
||||
], [AC_MSG_RESULT([no])], [AC_MSG_RESULT([no])])
|
||||
|
||||
dnl Check for members of the stat structure
|
||||
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev])
|
||||
dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exist
|
||||
|
||||
@@ -184,7 +184,7 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa
|
||||
}
|
||||
|
||||
const_name = php_com_olestring_to_string(bstr_ids, &len, codepage);
|
||||
c.name = zend_string_init(const_name, len, 1);
|
||||
c.name = zend_string_init(const_name, len, mode & CONST_PERSISTENT);
|
||||
// TODO: avoid reallocation???
|
||||
efree(const_name);
|
||||
if(c.name == NULL) {
|
||||
@@ -195,17 +195,17 @@ PHP_COM_DOTNET_API int php_com_import_typelib(ITypeLib *TL, int mode, int codepa
|
||||
SysFreeString(bstr_ids);
|
||||
|
||||
/* sanity check for the case where the constant is already defined */
|
||||
php_com_zval_from_variant(&value, pVarDesc->lpvarValue, codepage);
|
||||
if ((exists = zend_get_constant(c.name)) != NULL) {
|
||||
if (COMG(autoreg_verbose) && !compare_function(&results, &c.value, exists)) {
|
||||
php_error_docref(NULL, E_WARNING, "Type library constant %s is already defined", c.name);
|
||||
if (COMG(autoreg_verbose) && !compare_function(&results, &value, exists)) {
|
||||
php_error_docref(NULL, E_WARNING, "Type library constant %s is already defined", ZSTR_VAL(c.name));
|
||||
}
|
||||
zend_string_release_ex(c.name, 1);
|
||||
zend_string_release_ex(c.name, mode & CONST_PERSISTENT);
|
||||
ITypeInfo_ReleaseVarDesc(TypeInfo, pVarDesc);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* register the constant */
|
||||
php_com_zval_from_variant(&value, pVarDesc->lpvarValue, codepage);
|
||||
if (Z_TYPE(value) == IS_LONG) {
|
||||
ZEND_CONSTANT_SET_FLAGS(&c, mode, 0);
|
||||
ZVAL_LONG(&c.value, Z_LVAL(value));
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug #77621 (Already defined constants are not properly reported)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('com_dotnet')) die('skip com_dotnet extension not available');
|
||||
?>
|
||||
--INI--
|
||||
com.autoregister_verbose=1
|
||||
--FILE--
|
||||
<?php
|
||||
define('ADSTYPE_INVALID', 0);
|
||||
$root = dirname(array_change_key_case($_SERVER, CASE_UPPER)['COMSPEC']);
|
||||
com_load_typelib("$root\activeds.tlb");
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Warning: com_load_typelib(): Type library constant ADSTYPE_INVALID is already defined in %s on line %d
|
||||
===DONE===
|
||||
@@ -48,7 +48,7 @@ PSL => No
|
||||
HTTPS_PROXY => Yes
|
||||
MULTI_SSL => %s
|
||||
BROTLI => %s
|
||||
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
|
||||
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
|
||||
Host => %s-pc-win32
|
||||
SSL Version => OpenSSL/%s
|
||||
ZLib Version => %s
|
||||
|
||||
@@ -18,6 +18,6 @@ curl_close($ch);
|
||||
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "%Srotocol%s"
|
||||
int(1)
|
||||
--EXPECTREGEX--
|
||||
string\(\d+\) "([^\r\n]*rotocol[^\r\n]+|Could not resolve host: .+)"
|
||||
int\(\d\)
|
||||
+8
-2
@@ -1,7 +1,13 @@
|
||||
dnl config.m4 for date extension
|
||||
|
||||
sinclude(ext/date/lib/timelib.m4)
|
||||
sinclude(lib/timelib.m4)
|
||||
dnl Check for headers needed by timelib
|
||||
AC_CHECK_HEADERS([ \
|
||||
strings.h \
|
||||
io.h
|
||||
])
|
||||
|
||||
dnl Check for strtoll, atoll
|
||||
AC_CHECK_FUNCS(strtoll atoll)
|
||||
|
||||
PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
|
||||
timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
dnl
|
||||
dnl TL_DEF_HAVE(what [, why])
|
||||
dnl
|
||||
dnl Generates 'AC_DEFINE(HAVE_WHAT, 1, [WHY])'
|
||||
dnl
|
||||
AC_DEFUN([TL_DEF_HAVE],[AC_DEFINE([HAVE_]translit($1,a-z_.-,A-Z___),1,[ $2 ])])dnl
|
||||
|
||||
dnl
|
||||
dnl TL_CHECK_INT_TYPE(type)
|
||||
dnl
|
||||
AC_DEFUN([TL_CHECK_INT_TYPE],[
|
||||
AC_CACHE_CHECK([for $1], ac_cv_int_type_$1, [
|
||||
AC_TRY_COMPILE([
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#if HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#elif HAVE_STDINT_H
|
||||
# include <stdint.h>
|
||||
#endif],
|
||||
[if (($1 *) 0)
|
||||
return 0;
|
||||
if (sizeof ($1))
|
||||
return 0;
|
||||
], [ac_cv_int_type_$1=yes], [ac_cv_int_type_$1=no])
|
||||
])
|
||||
if test "$ac_cv_int_type_$1" = "yes"; then
|
||||
TL_DEF_HAVE($1, [Define if $1 type is present.])
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl
|
||||
dnl AC_TIMELIB_C_BIGENDIAN
|
||||
dnl Replacement macro for AC_C_BIGENDIAN
|
||||
dnl
|
||||
AC_DEFUN([AC_TIMELIB_C_BIGENDIAN],
|
||||
[AC_CACHE_CHECK([whether byte ordering is bigendian], ac_cv_c_bigendian_php,
|
||||
[
|
||||
ac_cv_c_bigendian_php=unknown
|
||||
AC_TRY_RUN(
|
||||
[
|
||||
int main(void)
|
||||
{
|
||||
short one = 1;
|
||||
char *cp = (char *)&one;
|
||||
|
||||
if (*cp == 0) {
|
||||
return(0);
|
||||
} else {
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown])
|
||||
])
|
||||
if test $ac_cv_c_bigendian_php = yes; then
|
||||
AC_DEFINE(WORDS_BIGENDIAN, [], [Define if processor uses big-endian word])
|
||||
fi
|
||||
])dnl
|
||||
|
||||
dnl Check for types, sizes, etc. needed by timelib
|
||||
AC_CHECK_SIZEOF(long, 8)
|
||||
AC_CHECK_SIZEOF(int, 4)
|
||||
TL_CHECK_INT_TYPE(int32_t)
|
||||
TL_CHECK_INT_TYPE(uint32_t)
|
||||
|
||||
dnl Check for headers needed by timelib
|
||||
AC_CHECK_HEADERS([ \
|
||||
sys/time.h \
|
||||
sys/types.h \
|
||||
stdint.h \
|
||||
dirent.h \
|
||||
string.h \
|
||||
strings.h \
|
||||
unistd.h \
|
||||
io.h
|
||||
])
|
||||
|
||||
dnl Check for strtoll, atoll
|
||||
AC_CHECK_FUNCS(strtoll atoll strftime gettimeofday)
|
||||
+1
-8
@@ -5275,7 +5275,6 @@ PHP_METHOD(DatePeriod, __wakeup)
|
||||
/* {{{ date_period_read_property */
|
||||
static zval *date_period_read_property(zval *object, zval *member, int type, void **cache_slot, zval *rv)
|
||||
{
|
||||
zval *zv;
|
||||
if (type != BP_VAR_IS && type != BP_VAR_R) {
|
||||
zend_throw_error(NULL, "Retrieval of DatePeriod properties for modification is unsupported");
|
||||
return &EG(uninitialized_zval);
|
||||
@@ -5283,13 +5282,7 @@ static zval *date_period_read_property(zval *object, zval *member, int type, voi
|
||||
|
||||
Z_OBJPROP_P(object); /* build properties hash table */
|
||||
|
||||
zv = zend_std_read_property(object, member, type, cache_slot, rv);
|
||||
if (Z_TYPE_P(zv) == IS_OBJECT && Z_OBJ_HANDLER_P(zv, clone_obj)) {
|
||||
/* defensive copy */
|
||||
ZVAL_OBJ(zv, Z_OBJ_HANDLER_P(zv, clone_obj)(zv));
|
||||
}
|
||||
|
||||
return zv;
|
||||
return zend_std_read_property(object, member, type, cache_slot, rv);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
+21
-10
@@ -3125,7 +3125,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
break;
|
||||
}
|
||||
|
||||
if (maker_note->offset >= value_len) {
|
||||
if (value_len < 2 || maker_note->offset >= value_len - 1) {
|
||||
/* Do not go past the value end */
|
||||
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "IFD data too short: 0x%04X offset 0x%04X", value_len, maker_note->offset);
|
||||
return FALSE;
|
||||
@@ -3180,6 +3180,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
|
||||
#endif
|
||||
default:
|
||||
case MN_OFFSET_NORMAL:
|
||||
data_len = value_len;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -3378,6 +3379,10 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
|
||||
break;
|
||||
|
||||
case TAG_USERCOMMENT:
|
||||
EFREE_IF(ImageInfo->UserComment);
|
||||
ImageInfo->UserComment = NULL;
|
||||
EFREE_IF(ImageInfo->UserCommentEncoding);
|
||||
ImageInfo->UserCommentEncoding = NULL;
|
||||
ImageInfo->UserCommentLength = exif_process_user_comment(ImageInfo, &(ImageInfo->UserComment), &(ImageInfo->UserCommentEncoding), value_ptr, byte_count);
|
||||
break;
|
||||
|
||||
@@ -3899,7 +3904,7 @@ static int exif_scan_thumbnail(image_info_type *ImageInfo)
|
||||
return FALSE;
|
||||
marker = c;
|
||||
length = php_jpg_get16(data+pos);
|
||||
if (pos+length>=ImageInfo->Thumbnail.size) {
|
||||
if (length > ImageInfo->Thumbnail.size || pos >= ImageInfo->Thumbnail.size - length) {
|
||||
return FALSE;
|
||||
}
|
||||
#ifdef EXIF_DEBUG
|
||||
@@ -3920,6 +3925,10 @@ static int exif_scan_thumbnail(image_info_type *ImageInfo)
|
||||
case M_SOF14:
|
||||
case M_SOF15:
|
||||
/* handle SOFn block */
|
||||
if (length < 8 || ImageInfo->Thumbnail.size - 8 < pos) {
|
||||
/* exif_process_SOFn needs 8 bytes */
|
||||
return FALSE;
|
||||
}
|
||||
exif_process_SOFn(data+pos, marker, &sof_info);
|
||||
ImageInfo->Thumbnail.height = sof_info.height;
|
||||
ImageInfo->Thumbnail.width = sof_info.width;
|
||||
@@ -3957,10 +3966,10 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
tag_table_type tag_table = exif_get_tag_table(section_index);
|
||||
|
||||
if (ImageInfo->ifd_nesting_level > MAX_IFD_NESTING_LEVEL) {
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (ImageInfo->FileSize >= dir_offset+2) {
|
||||
if (ImageInfo->FileSize >= 2 && ImageInfo->FileSize - 2 >= dir_offset) {
|
||||
sn = exif_file_sections_add(ImageInfo, M_PSEUDO, 2, NULL);
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Read from TIFF: filesize(x%04X), IFD dir(x%04X + x%04X)", ImageInfo->FileSize, dir_offset, 2);
|
||||
@@ -3968,8 +3977,8 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
php_stream_seek(ImageInfo->infile, dir_offset, SEEK_SET); /* we do not know the order of sections */
|
||||
php_stream_read(ImageInfo->infile, (char*)ImageInfo->file.list[sn].data, 2);
|
||||
num_entries = php_ifd_get16u(ImageInfo->file.list[sn].data, ImageInfo->motorola_intel);
|
||||
dir_size = 2/*num dir entries*/ +12/*length of entry*/*num_entries +4/* offset to next ifd (points to thumbnail or NULL)*/;
|
||||
if (ImageInfo->FileSize >= dir_offset+dir_size) {
|
||||
dir_size = 2/*num dir entries*/ +12/*length of entry*/*(size_t)num_entries +4/* offset to next ifd (points to thumbnail or NULL)*/;
|
||||
if (ImageInfo->FileSize >= dir_size && ImageInfo->FileSize - dir_size >= dir_offset) {
|
||||
#ifdef EXIF_DEBUG
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Read from TIFF: filesize(x%04X), IFD dir(x%04X + x%04X), IFD entries(%d)", ImageInfo->FileSize, dir_offset+2, dir_size-2, num_entries);
|
||||
#endif
|
||||
@@ -4052,9 +4061,9 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ImageInfo->FileSize >= dir_offset + ImageInfo->file.list[sn].size) {
|
||||
if (ImageInfo->FileSize >= ImageInfo->file.list[sn].size && ImageInfo->FileSize - ImageInfo->file.list[sn].size >= dir_offset) {
|
||||
if (ifd_size > dir_size) {
|
||||
if (dir_offset + ifd_size > ImageInfo->FileSize) {
|
||||
if (ImageInfo->FileSize < ifd_size || dir_offset > ImageInfo->FileSize - ifd_size) {
|
||||
exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "Error in TIFF: filesize(x%04X) less than size of IFD(x%04X + x%04X)", ImageInfo->FileSize, dir_offset, ifd_size);
|
||||
return FALSE;
|
||||
}
|
||||
@@ -4651,7 +4660,9 @@ PHP_FUNCTION(exif_thumbnail)
|
||||
ZVAL_STRINGL(return_value, ImageInfo.Thumbnail.data, ImageInfo.Thumbnail.size);
|
||||
if (arg_c >= 3) {
|
||||
if (!ImageInfo.Thumbnail.width || !ImageInfo.Thumbnail.height) {
|
||||
exif_scan_thumbnail(&ImageInfo);
|
||||
if (!exif_scan_thumbnail(&ImageInfo)) {
|
||||
ImageInfo.Thumbnail.width = ImageInfo.Thumbnail.height = 0;
|
||||
}
|
||||
}
|
||||
zval_ptr_dtor(z_width);
|
||||
zval_ptr_dtor(z_height);
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug 77540 (Invalid Read on exif_process_SOFn)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
|
||||
--FILE--
|
||||
<?php
|
||||
$width = $height = 42;
|
||||
$s = exif_thumbnail(__DIR__."/bug77540.jpg", $width, $height);
|
||||
echo "Width ".$width."\n";
|
||||
echo "Height ".$height."\n";
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
Width 0
|
||||
Height 0
|
||||
DONE
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug 77563 (Uninitialized read in exif_process_IFD_in_MAKERNOTE)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
|
||||
--FILE--
|
||||
<?php
|
||||
$s = exif_thumbnail(__DIR__."/bug77563.jpg");
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
Warning: exif_thumbnail(bug77563.jpg): IFD data too short: 0x0009 offset 0x0008 in %s%ebug77563.php on line %d
|
||||
|
||||
Warning: exif_thumbnail(bug77563.jpg): File structure corrupted in %s%ebug77563.php on line %d
|
||||
|
||||
Warning: exif_thumbnail(bug77563.jpg): Invalid JPEG file in %s%ebug77563.php on line %d
|
||||
DONE
|
||||
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Bug 77564 (Memory leak in exif_process_IFD_TAG)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(exif_read_data(dirname(__FILE__) . '/bug77564.jpg'));
|
||||
?>
|
||||
DONE
|
||||
--EXPECTF--
|
||||
|
||||
Warning: exif_read_data(bug77564.jpg): Illegal IFD offset in %sbug77564.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug77564.jpg): File structure corrupted in %sbug77564.php on line %d
|
||||
|
||||
Warning: exif_read_data(bug77564.jpg): Invalid JPEG file in %sbug77564.php on line %d
|
||||
bool(false)
|
||||
DONE
|
||||
+1
-1
@@ -1857,7 +1857,7 @@ data_accepted:
|
||||
php_pollfd p;
|
||||
int i;
|
||||
|
||||
p.fd = ftp->fd;
|
||||
p.fd = data->fd;
|
||||
p.events = (err == SSL_ERROR_WANT_READ) ? (POLLIN|POLLPRI) : POLLOUT;
|
||||
p.revents = 0;
|
||||
|
||||
|
||||
@@ -713,8 +713,7 @@ static inline void mb_regex_substitute(
|
||||
sp = p; /* save position */
|
||||
clen = (int) php_mb_mbchar_bytes_ex(++p, enc);
|
||||
if (clen != 1 || p == eos) {
|
||||
/* skip escaped multibyte char */
|
||||
p += clen;
|
||||
/* skip backslash followed by multibyte char */
|
||||
smart_str_appendl(pbuf, sp, p - sp);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--TEST--
|
||||
Bug #77514: mb_ereg_replace() with trailing backslash adds null byte
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$a="abc123";
|
||||
var_dump(mb_ereg_replace("123","def\\",$a));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(7) "abcdef\"
|
||||
+2
-2
@@ -516,7 +516,7 @@ PHP_INI_BEGIN()
|
||||
STD_PHP_INI_ENTRY("mysqli.default_socket", NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_socket, zend_mysqli_globals, mysqli_globals)
|
||||
#endif
|
||||
STD_PHP_INI_BOOLEAN("mysqli.reconnect", "0", PHP_INI_SYSTEM, OnUpdateLong, reconnect, zend_mysqli_globals, mysqli_globals)
|
||||
STD_PHP_INI_BOOLEAN("mysqli.allow_local_infile", "1", PHP_INI_SYSTEM, OnUpdateLong, allow_local_infile, zend_mysqli_globals, mysqli_globals)
|
||||
STD_PHP_INI_BOOLEAN("mysqli.allow_local_infile", "0", PHP_INI_SYSTEM, OnUpdateLong, allow_local_infile, zend_mysqli_globals, mysqli_globals)
|
||||
PHP_INI_END()
|
||||
/* }}} */
|
||||
|
||||
@@ -541,7 +541,7 @@ static PHP_GINIT_FUNCTION(mysqli)
|
||||
mysqli_globals->reconnect = 0;
|
||||
mysqli_globals->report_mode = 0;
|
||||
mysqli_globals->report_ht = 0;
|
||||
mysqli_globals->allow_local_infile = 1;
|
||||
mysqli_globals->allow_local_infile = 0;
|
||||
#ifdef HAVE_EMBEDDED_MYSQLI
|
||||
mysqli_globals->embedded = 1;
|
||||
#else
|
||||
|
||||
@@ -17,6 +17,8 @@ if ($msg = check_local_infile_support($link, $engine))
|
||||
|
||||
mysqli_close($link);
|
||||
?>
|
||||
--INI--
|
||||
mysqli.allow_local_infile=1
|
||||
--FILE--
|
||||
<?php
|
||||
require_once("connect.inc");
|
||||
|
||||
@@ -5,6 +5,8 @@ Bug #36745 (LOAD DATA LOCAL INFILE doesn't return correct error message)
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--INI--
|
||||
mysqli.allow_local_infile=1
|
||||
--FILE--
|
||||
<?php
|
||||
require_once("connect.inc");
|
||||
|
||||
@@ -15,6 +15,8 @@ if ($msg = check_local_infile_support($link, $engine))
|
||||
mysqli_close($link);
|
||||
|
||||
?>
|
||||
--INI--
|
||||
mysqli.allow_local_infile=1
|
||||
--FILE--
|
||||
<?php
|
||||
require_once("connect.inc");
|
||||
|
||||
@@ -17,6 +17,9 @@ if ($msg = check_local_infile_support($link, $engine))
|
||||
mysqli_close($link);
|
||||
?>
|
||||
--INI--
|
||||
mysqli.allow_local_infile=1
|
||||
mysqli.allow_persistent=1
|
||||
mysqli.max_persistent=1
|
||||
open_basedir=
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -6,6 +6,8 @@ require_once('skipif.inc');
|
||||
require_once('skipifemb.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--INI--
|
||||
mysqli.allow_local_infile=1
|
||||
--FILE--
|
||||
<?php
|
||||
require("connect.inc");
|
||||
|
||||
@@ -12,6 +12,7 @@ if (!function_exists('mysqli_get_client_stats')) {
|
||||
--INI--
|
||||
mysqlnd.collect_statistics=1
|
||||
mysqlnd.collect_memory_statistics=1
|
||||
mysqli.allow_local_infile=1
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
|
||||
@@ -6,6 +6,8 @@ require_once('skipif.inc');
|
||||
require_once('skipifemb.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--INI--
|
||||
mysqli.allow_local_infile=1
|
||||
--FILE--
|
||||
<?php
|
||||
require_once("connect.inc");
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
ensure default for local infile is off
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once("connect.inc");
|
||||
|
||||
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
||||
$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"');
|
||||
$row = mysqli_fetch_assoc($res);
|
||||
echo "server: ", $row['Value'], "\n";
|
||||
mysqli_free_result($res);
|
||||
mysqli_close($link);
|
||||
|
||||
echo "connector: ", ini_get("mysqli.allow_local_infile"), "\n";
|
||||
|
||||
print "done!\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
server: %s
|
||||
connector: 0
|
||||
done!
|
||||
@@ -0,0 +1,28 @@
|
||||
--TEST--
|
||||
enable local infile
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--INI--
|
||||
mysqli.allow_local_infile=1
|
||||
--FILE--
|
||||
<?php
|
||||
require_once("connect.inc");
|
||||
|
||||
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
||||
$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"');
|
||||
$row = mysqli_fetch_assoc($res);
|
||||
echo "server: ", $row['Value'], "\n";
|
||||
mysqli_free_result($res);
|
||||
mysqli_close($link);
|
||||
|
||||
echo "connector: ", ini_get("mysqli.allow_local_infile"), "\n";
|
||||
|
||||
print "done!\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
server: %s
|
||||
connector: 1
|
||||
done!
|
||||
@@ -6,6 +6,8 @@ require_once('skipif.inc');
|
||||
require_once('skipifemb.inc');
|
||||
require_once('skipifconnectfailure.inc');
|
||||
?>
|
||||
--INI--
|
||||
mysqli.allow_local_infile=1
|
||||
--FILE--
|
||||
<?php
|
||||
include("connect.inc");
|
||||
|
||||
@@ -10,6 +10,7 @@ if (!$IS_MYSQLND)
|
||||
die("skip mysqlnd only test");
|
||||
?>
|
||||
--INI--
|
||||
mysqli.allow_local_infile=1
|
||||
mysqli.allow_persistent=1
|
||||
mysqli.max_persistent=10
|
||||
--FILE--
|
||||
|
||||
@@ -480,7 +480,8 @@ MYSQLND_METHOD(mysqlnd_conn_data, get_updated_connect_flags)(MYSQLND_CONN_DATA *
|
||||
MYSQLND_VIO * vio = conn->vio;
|
||||
|
||||
DBG_ENTER("mysqlnd_conn_data::get_updated_connect_flags");
|
||||
/* we allow load data local infile by default */
|
||||
/* allow CLIENT_LOCAL_FILES capability, although extensions basing on mysqlnd
|
||||
shouldn't allow 'load data local infile' by default due to security issues */
|
||||
mysql_flags |= MYSQLND_CAPABILITIES;
|
||||
|
||||
mysql_flags |= conn->options->flags; /* use the flags from set_client_option() */
|
||||
|
||||
@@ -851,6 +851,7 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, const unsi
|
||||
MYSQLND_PACKET_ROW * row_packet;
|
||||
MYSQLND_CONN_DATA * conn = result->conn;
|
||||
const MYSQLND_RES_METADATA * const meta = result->meta;
|
||||
void *checkpoint;
|
||||
|
||||
DBG_ENTER("mysqlnd_stmt_fetch_row_unbuffered");
|
||||
|
||||
@@ -873,6 +874,9 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, const unsi
|
||||
/* Let the row packet fill our buffer and skip additional malloc + memcpy */
|
||||
row_packet->skip_extraction = stmt && stmt->result_bind? FALSE:TRUE;
|
||||
|
||||
checkpoint = result->memory_pool->checkpoint;
|
||||
mysqlnd_mempool_save_state(result->memory_pool);
|
||||
|
||||
/*
|
||||
If we skip rows (stmt == NULL || stmt->result_bind == NULL) we have to
|
||||
result->unbuf->m.free_last_data() before it. The function returns always true.
|
||||
@@ -895,6 +899,8 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, const unsi
|
||||
conn->options->int_and_float_native,
|
||||
conn->stats))
|
||||
{
|
||||
mysqlnd_mempool_restore_state(result->memory_pool);
|
||||
result->memory_pool->checkpoint = checkpoint;
|
||||
DBG_RETURN(FAIL);
|
||||
}
|
||||
|
||||
@@ -965,6 +971,9 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, const unsi
|
||||
}
|
||||
}
|
||||
|
||||
mysqlnd_mempool_restore_state(result->memory_pool);
|
||||
result->memory_pool->checkpoint = checkpoint;
|
||||
|
||||
DBG_INF_FMT("ret=%s fetched_anything=%u", ret == PASS? "PASS":"FAIL", *fetched_anything);
|
||||
DBG_RETURN(ret);
|
||||
}
|
||||
|
||||
@@ -810,7 +810,7 @@ void zend_optimizer_compact_literals(zend_op_array *op_array, zend_optimizer_ctx
|
||||
Z_CACHE_SLOT_P(val) = op_array->cache_size;
|
||||
op_array->cache_size += sizeof(zval);
|
||||
}
|
||||
} else if (opline->opcode != ZEND_RECV) {
|
||||
} else if (opline->opcode != ZEND_RECV && opline->opcode != ZEND_EXT_NOP) {
|
||||
break;
|
||||
}
|
||||
opline++;
|
||||
|
||||
@@ -855,7 +855,7 @@ static inline int ct_eval_func_call(
|
||||
} else if (zend_string_equals_literal(name, "array_merge")
|
||||
|| zend_string_equals_literal(name, "array_replace")
|
||||
|| zend_string_equals_literal(name, "array_merge_recursive")
|
||||
|| zend_string_equals_literal(name, "array_merge_recursive")
|
||||
|| zend_string_equals_literal(name, "array_replace_recursive")
|
||||
|| zend_string_equals_literal(name, "array_diff")
|
||||
|| zend_string_equals_literal(name, "array_diff_assoc")
|
||||
|| zend_string_equals_literal(name, "array_diff_key")) {
|
||||
@@ -920,7 +920,7 @@ static inline int ct_eval_func_call(
|
||||
} else if (zend_string_equals_literal(name, "array_merge")
|
||||
|| zend_string_equals_literal(name, "array_replace")
|
||||
|| zend_string_equals_literal(name, "array_merge_recursive")
|
||||
|| zend_string_equals_literal(name, "array_merge_recursive")
|
||||
|| zend_string_equals_literal(name, "array_replace_recursive")
|
||||
|| zend_string_equals_literal(name, "array_diff")
|
||||
|| zend_string_equals_literal(name, "array_diff_assoc")
|
||||
|| zend_string_equals_literal(name, "array_diff_key")) {
|
||||
|
||||
@@ -236,11 +236,12 @@ static inline void accel_restart_enter(void)
|
||||
#ifdef ZEND_WIN32
|
||||
INCREMENT(restart_in);
|
||||
#else
|
||||
# ifdef _AIX
|
||||
static FLOCK_STRUCTURE(restart_in_progress, F_WRLCK, SEEK_SET, 2, 1);
|
||||
# else
|
||||
static const FLOCK_STRUCTURE(restart_in_progress, F_WRLCK, SEEK_SET, 2, 1);
|
||||
#endif
|
||||
struct flock restart_in_progress;
|
||||
|
||||
restart_in_progress.l_type = F_WRLCK;
|
||||
restart_in_progress.l_whence = SEEK_SET;
|
||||
restart_in_progress.l_start = 2;
|
||||
restart_in_progress.l_len = 1;
|
||||
|
||||
if (fcntl(lock_file, F_SETLK, &restart_in_progress) == -1) {
|
||||
zend_accel_error(ACCEL_LOG_DEBUG, "RestartC(+1): %s (%d)", strerror(errno), errno);
|
||||
@@ -255,11 +256,12 @@ static inline void accel_restart_leave(void)
|
||||
ZCSG(restart_in_progress) = 0;
|
||||
DECREMENT(restart_in);
|
||||
#else
|
||||
# ifdef _AIX
|
||||
static FLOCK_STRUCTURE(restart_finished, F_UNLCK, SEEK_SET, 2, 1);
|
||||
# else
|
||||
static const FLOCK_STRUCTURE(restart_finished, F_UNLCK, SEEK_SET, 2, 1);
|
||||
# endif
|
||||
struct flock restart_finished;
|
||||
|
||||
restart_finished.l_type = F_UNLCK;
|
||||
restart_finished.l_whence = SEEK_SET;
|
||||
restart_finished.l_start = 2;
|
||||
restart_finished.l_len = 1;
|
||||
|
||||
ZCSG(restart_in_progress) = 0;
|
||||
if (fcntl(lock_file, F_SETLK, &restart_finished) == -1) {
|
||||
@@ -272,7 +274,12 @@ static inline int accel_restart_is_active(void)
|
||||
{
|
||||
if (ZCSG(restart_in_progress)) {
|
||||
#ifndef ZEND_WIN32
|
||||
FLOCK_STRUCTURE(restart_check, F_WRLCK, SEEK_SET, 2, 1);
|
||||
struct flock restart_check;
|
||||
|
||||
restart_check.l_type = F_WRLCK;
|
||||
restart_check.l_whence = SEEK_SET;
|
||||
restart_check.l_start = 2;
|
||||
restart_check.l_len = 1;
|
||||
|
||||
if (fcntl(lock_file, F_GETLK, &restart_check) == -1) {
|
||||
zend_accel_error(ACCEL_LOG_DEBUG, "RestartC: %s (%d)", strerror(errno), errno);
|
||||
@@ -297,11 +304,12 @@ static inline int accel_activate_add(void)
|
||||
#ifdef ZEND_WIN32
|
||||
INCREMENT(mem_usage);
|
||||
#else
|
||||
# ifdef _AIX
|
||||
static FLOCK_STRUCTURE(mem_usage_lock, F_RDLCK, SEEK_SET, 1, 1);
|
||||
# else
|
||||
static const FLOCK_STRUCTURE(mem_usage_lock, F_RDLCK, SEEK_SET, 1, 1);
|
||||
# endif
|
||||
struct flock mem_usage_lock;
|
||||
|
||||
mem_usage_lock.l_type = F_RDLCK;
|
||||
mem_usage_lock.l_whence = SEEK_SET;
|
||||
mem_usage_lock.l_start = 1;
|
||||
mem_usage_lock.l_len = 1;
|
||||
|
||||
if (fcntl(lock_file, F_SETLK, &mem_usage_lock) == -1) {
|
||||
zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC(+1): %s (%d)", strerror(errno), errno);
|
||||
@@ -320,11 +328,12 @@ static inline void accel_deactivate_sub(void)
|
||||
ZCG(counted) = 0;
|
||||
}
|
||||
#else
|
||||
# ifdef _AIX
|
||||
static FLOCK_STRUCTURE(mem_usage_unlock, F_UNLCK, SEEK_SET, 1, 1);
|
||||
# else
|
||||
static const FLOCK_STRUCTURE(mem_usage_unlock, F_UNLCK, SEEK_SET, 1, 1);
|
||||
# endif
|
||||
struct flock mem_usage_unlock;
|
||||
|
||||
mem_usage_unlock.l_type = F_UNLCK;
|
||||
mem_usage_unlock.l_whence = SEEK_SET;
|
||||
mem_usage_unlock.l_start = 1;
|
||||
mem_usage_unlock.l_len = 1;
|
||||
|
||||
if (fcntl(lock_file, F_SETLK, &mem_usage_unlock) == -1) {
|
||||
zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC(-1): %s (%d)", strerror(errno), errno);
|
||||
@@ -337,11 +346,12 @@ static inline void accel_unlock_all(void)
|
||||
#ifdef ZEND_WIN32
|
||||
accel_deactivate_sub();
|
||||
#else
|
||||
# ifdef _AIX
|
||||
static FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0);
|
||||
# else
|
||||
static const FLOCK_STRUCTURE(mem_usage_unlock_all, F_UNLCK, SEEK_SET, 0, 0);
|
||||
# endif
|
||||
struct flock mem_usage_unlock_all;
|
||||
|
||||
mem_usage_unlock_all.l_type = F_UNLCK;
|
||||
mem_usage_unlock_all.l_whence = SEEK_SET;
|
||||
mem_usage_unlock_all.l_start = 0;
|
||||
mem_usage_unlock_all.l_len = 0;
|
||||
|
||||
if (fcntl(lock_file, F_SETLK, &mem_usage_unlock_all) == -1) {
|
||||
zend_accel_error(ACCEL_LOG_DEBUG, "UnlockAll: %s (%d)", strerror(errno), errno);
|
||||
@@ -830,8 +840,12 @@ static inline int accel_is_inactive(void)
|
||||
return SUCCESS;
|
||||
}
|
||||
#else
|
||||
FLOCK_STRUCTURE(mem_usage_check, F_WRLCK, SEEK_SET, 1, 1);
|
||||
struct flock mem_usage_check;
|
||||
|
||||
mem_usage_check.l_type = F_WRLCK;
|
||||
mem_usage_check.l_whence = SEEK_SET;
|
||||
mem_usage_check.l_start = 1;
|
||||
mem_usage_check.l_len = 1;
|
||||
mem_usage_check.l_pid = -1;
|
||||
if (fcntl(lock_file, F_GETLK, &mem_usage_check) == -1) {
|
||||
zend_accel_error(ACCEL_LOG_DEBUG, "UpdateC: %s (%d)", strerror(errno), errno);
|
||||
|
||||
@@ -89,19 +89,6 @@
|
||||
/*** file locking ***/
|
||||
#ifndef ZEND_WIN32
|
||||
extern int lock_file;
|
||||
|
||||
# if defined(HAVE_FLOCK_AIX64)
|
||||
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
|
||||
struct flock name = {type, whence, 0, 0, 0, start, len }
|
||||
# elif defined(HAVE_FLOCK_BSD)
|
||||
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
|
||||
struct flock name = {start, len, -1, type, whence}
|
||||
# elif defined(HAVE_FLOCK_LINUX)
|
||||
# define FLOCK_STRUCTURE(name, type, whence, start, len) \
|
||||
struct flock name = {type, whence, start, len}
|
||||
# else
|
||||
# error "Don't know how to define struct flock"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPCACHE_FILE_CACHE) && defined(ZEND_WIN32)
|
||||
|
||||
@@ -341,63 +341,6 @@ int main() {
|
||||
msg=yes],[msg=no],[msg=no])
|
||||
AC_MSG_RESULT([$msg])
|
||||
|
||||
flock_type=unknown
|
||||
AC_MSG_CHECKING(for struct flock layout)
|
||||
|
||||
if test "$flock_type" = "unknown"; then
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <fcntl.h>
|
||||
struct flock lock = { 1, 2, 3, 4, 5, 6, 7 };
|
||||
int main() {
|
||||
if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 6 && lock.l_len== 7) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
]])], [
|
||||
flock_type=aix64
|
||||
AC_DEFINE([HAVE_FLOCK_AIX64], [], [Struct flock is 64-bit AIX-type])
|
||||
], [])
|
||||
fi
|
||||
|
||||
if test "$flock_type" = "unknown"; then
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <fcntl.h>
|
||||
struct flock lock = { 1, 2, 3, 4, 5 };
|
||||
int main() {
|
||||
if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
]])], [
|
||||
flock_type=linux
|
||||
AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
|
||||
], [])
|
||||
fi
|
||||
|
||||
if test "$flock_type" = "unknown"; then
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <fcntl.h>
|
||||
struct flock lock = { 1, 2, 3, 4, 5 };
|
||||
int main() {
|
||||
if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
]])], [
|
||||
flock_type=bsd
|
||||
AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type])
|
||||
], [])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT([$flock_type])
|
||||
|
||||
if test "$flock_type" = "unknown"; then
|
||||
AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
|
||||
fi
|
||||
|
||||
PHP_NEW_EXTENSION(opcache,
|
||||
ZendAccelerator.c \
|
||||
zend_accelerator_blacklist.c \
|
||||
|
||||
@@ -375,15 +375,15 @@ void zend_shared_alloc_safe_unlock(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef ZEND_WIN32
|
||||
/* name l_type l_whence l_start l_len */
|
||||
static FLOCK_STRUCTURE(mem_write_lock, F_WRLCK, SEEK_SET, 0, 1);
|
||||
static FLOCK_STRUCTURE(mem_write_unlock, F_UNLCK, SEEK_SET, 0, 1);
|
||||
#endif
|
||||
|
||||
void zend_shared_alloc_lock(void)
|
||||
{
|
||||
#ifndef ZEND_WIN32
|
||||
struct flock mem_write_lock;
|
||||
|
||||
mem_write_lock.l_type = F_WRLCK;
|
||||
mem_write_lock.l_whence = SEEK_SET;
|
||||
mem_write_lock.l_start = 0;
|
||||
mem_write_lock.l_len = 1;
|
||||
|
||||
#ifdef ZTS
|
||||
tsrm_mutex_lock(zts_lock);
|
||||
@@ -414,6 +414,15 @@ void zend_shared_alloc_lock(void)
|
||||
|
||||
void zend_shared_alloc_unlock(void)
|
||||
{
|
||||
#ifndef ZEND_WIN32
|
||||
struct flock mem_write_unlock;
|
||||
|
||||
mem_write_unlock.l_type = F_UNLCK;
|
||||
mem_write_unlock.l_whence = SEEK_SET;
|
||||
mem_write_unlock.l_start = 0;
|
||||
mem_write_unlock.l_len = 1;
|
||||
#endif
|
||||
|
||||
ZCG(locked) = 0;
|
||||
|
||||
#ifndef ZEND_WIN32
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
|
||||
const WORKER_ARGV_VALUE = 'RUN_WORKER';
|
||||
|
||||
function phpt_notify()
|
||||
const WORKER_DEFAULT_NAME = 'server';
|
||||
|
||||
function phpt_notify($worker = WORKER_DEFAULT_NAME)
|
||||
{
|
||||
ServerClientTestCase::getInstance()->notify();
|
||||
ServerClientTestCase::getInstance()->notify($worker);
|
||||
}
|
||||
|
||||
function phpt_wait()
|
||||
function phpt_wait($worker = WORKER_DEFAULT_NAME)
|
||||
{
|
||||
ServerClientTestCase::getInstance()->wait();
|
||||
ServerClientTestCase::getInstance()->wait($worker);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -20,11 +22,11 @@ class ServerClientTestCase
|
||||
{
|
||||
private $isWorker = false;
|
||||
|
||||
private $workerHandle;
|
||||
private $workerHandle = [];
|
||||
|
||||
private $workerStdIn;
|
||||
private $workerStdIn = [];
|
||||
|
||||
private $workerStdOut;
|
||||
private $workerStdOut = [];
|
||||
|
||||
private static $instance;
|
||||
|
||||
@@ -46,26 +48,41 @@ class ServerClientTestCase
|
||||
$this->isWorker = $isWorker;
|
||||
}
|
||||
|
||||
private function spawnWorkerProcess($code)
|
||||
private function spawnWorkerProcess($worker, $code)
|
||||
{
|
||||
if (defined("PHP_WINDOWS_VERSION_MAJOR")) {
|
||||
$ini = php_ini_loaded_file();
|
||||
$cmd = sprintf('%s %s "%s" %s', PHP_BINARY, $ini ? "-n -c $ini" : "", __FILE__, WORKER_ARGV_VALUE);
|
||||
$ini = php_ini_loaded_file();
|
||||
$cmd = sprintf(
|
||||
'%s %s "%s" %s',
|
||||
PHP_BINARY, $ini ? "-n -c $ini" : "",
|
||||
__FILE__,
|
||||
WORKER_ARGV_VALUE
|
||||
);
|
||||
} else {
|
||||
$cmd = sprintf('%s "%s" %s', PHP_BINARY, __FILE__, WORKER_ARGV_VALUE);
|
||||
$cmd = sprintf(
|
||||
'%s "%s" %s %s',
|
||||
PHP_BINARY,
|
||||
__FILE__,
|
||||
WORKER_ARGV_VALUE,
|
||||
$worker
|
||||
);
|
||||
}
|
||||
$this->workerHandle = proc_open($cmd, [['pipe', 'r'], ['pipe', 'w'], STDERR], $pipes);
|
||||
$this->workerStdIn = $pipes[0];
|
||||
$this->workerStdOut = $pipes[1];
|
||||
$this->workerHandle[$worker] = proc_open(
|
||||
$cmd,
|
||||
[['pipe', 'r'], ['pipe', 'w'], STDERR],
|
||||
$pipes
|
||||
);
|
||||
$this->workerStdIn[$worker] = $pipes[0];
|
||||
$this->workerStdOut[$worker] = $pipes[1];
|
||||
|
||||
fwrite($this->workerStdIn, $code . "\n---\n");
|
||||
fwrite($this->workerStdIn[$worker], $code . "\n---\n");
|
||||
}
|
||||
|
||||
private function cleanupWorkerProcess()
|
||||
private function cleanupWorkerProcess($worker)
|
||||
{
|
||||
fclose($this->workerStdIn);
|
||||
fclose($this->workerStdOut);
|
||||
proc_close($this->workerHandle);
|
||||
fclose($this->workerStdIn[$worker]);
|
||||
fclose($this->workerStdOut[$worker]);
|
||||
proc_close($this->workerHandle[$worker]);
|
||||
}
|
||||
|
||||
private function stripPhpTagsFromCode($code)
|
||||
@@ -90,21 +107,28 @@ class ServerClientTestCase
|
||||
eval($code);
|
||||
}
|
||||
|
||||
public function run($proc1Code, $proc2Code)
|
||||
public function run($masterCode, $workerCode)
|
||||
{
|
||||
$this->spawnWorkerProcess($this->stripPhpTagsFromCode($proc2Code));
|
||||
eval($this->stripPhpTagsFromCode($proc1Code));
|
||||
$this->cleanupWorkerProcess();
|
||||
if (!is_array($workerCode)) {
|
||||
$workerCode = [WORKER_DEFAULT_NAME => $workerCode];
|
||||
}
|
||||
foreach ($workerCode as $worker => $code) {
|
||||
$this->spawnWorkerProcess($worker, $this->stripPhpTagsFromCode($code));
|
||||
}
|
||||
eval($this->stripPhpTagsFromCode($masterCode));
|
||||
foreach ($workerCode as $worker => $code) {
|
||||
$this->cleanupWorkerProcess($worker);
|
||||
}
|
||||
}
|
||||
|
||||
public function wait()
|
||||
public function wait($worker)
|
||||
{
|
||||
fgets($this->isWorker ? STDIN : $this->workerStdOut);
|
||||
fgets($this->isWorker ? STDIN : $this->workerStdOut[$worker]);
|
||||
}
|
||||
|
||||
public function notify()
|
||||
public function notify($worker)
|
||||
{
|
||||
fwrite($this->isWorker ? STDOUT : $this->workerStdIn, "\n");
|
||||
fwrite($this->isWorker ? STDOUT : $this->workerStdIn[$worker], "\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
--TEST--
|
||||
Bug #76705: feof might hang on TLS streams in case of fragmented TLS records
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip openssl not loaded");
|
||||
if (!function_exists("proc_open")) die("skip no proc_open");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$certFile = __DIR__ . DIRECTORY_SEPARATOR . 'bug77390.pem.tmp';
|
||||
$cacertFile = __DIR__ . DIRECTORY_SEPARATOR . 'bug77390-ca.pem.tmp';
|
||||
|
||||
$peerName = 'bug77390';
|
||||
$clientCode = <<<'CODE'
|
||||
$context = stream_context_create(['ssl' => ['verify_peer' => false, 'peer_name' => '%s']]);
|
||||
|
||||
phpt_wait('server');
|
||||
phpt_notify('proxy');
|
||||
|
||||
phpt_wait('proxy');
|
||||
$fp = stream_socket_client("ssl://127.0.0.1:10012", $errornum, $errorstr, 3000, STREAM_CLIENT_CONNECT, $context);
|
||||
stream_set_blocking($fp, false);
|
||||
|
||||
$read = [$fp];
|
||||
$buf = '';
|
||||
$printed = false;
|
||||
while (stream_select($read, $write, $except, 1000)) {
|
||||
$chunk = stream_get_contents($fp, 4096);
|
||||
if ($chunk !== "") {
|
||||
var_dump($chunk);
|
||||
$buf .= $chunk;
|
||||
} elseif (!$printed) {
|
||||
$printed = true;
|
||||
var_dump($chunk);
|
||||
}
|
||||
if ($buf === 'hello, world') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
phpt_notify('server');
|
||||
phpt_notify('proxy');
|
||||
CODE;
|
||||
$clientCode = sprintf($clientCode, $peerName);
|
||||
|
||||
$serverCode = <<<'CODE'
|
||||
$context = stream_context_create(['ssl' => ['local_cert' => '%s']]);
|
||||
|
||||
$flags = STREAM_SERVER_BIND|STREAM_SERVER_LISTEN;
|
||||
$fp = stream_socket_server("ssl://127.0.0.1:10011", $errornum, $errorstr, $flags, $context);
|
||||
phpt_notify();
|
||||
|
||||
$conn = stream_socket_accept($fp);
|
||||
fwrite($conn, 'hello, world');
|
||||
|
||||
phpt_wait();
|
||||
fclose($conn);
|
||||
CODE;
|
||||
$serverCode = sprintf($serverCode, $certFile);
|
||||
|
||||
$proxyCode = <<<'CODE'
|
||||
phpt_wait();
|
||||
|
||||
$upstream = stream_socket_client("tcp://127.0.0.1:10011", $errornum, $errorstr, 3000, STREAM_CLIENT_CONNECT);
|
||||
stream_set_blocking($upstream, false);
|
||||
|
||||
$flags = STREAM_SERVER_BIND|STREAM_SERVER_LISTEN;
|
||||
$server = stream_socket_server("tcp://127.0.0.1:10012", $errornum, $errorstr, $flags);
|
||||
phpt_notify();
|
||||
|
||||
$conn = stream_socket_accept($server);
|
||||
stream_set_blocking($conn, false);
|
||||
|
||||
$read = [$upstream, $conn];
|
||||
while (stream_select($read, $write, $except, 1)) {
|
||||
foreach ($read as $fp) {
|
||||
$data = stream_get_contents($fp);
|
||||
if ($fp === $conn) {
|
||||
fwrite($upstream, $data);
|
||||
} else {
|
||||
if ($data !== '' && $data[0] === chr(23)) {
|
||||
$parts = str_split($data, (int) ceil(strlen($data) / 3));
|
||||
foreach ($parts as $part) {
|
||||
fwrite($conn, $part);
|
||||
usleep(1000);
|
||||
}
|
||||
} else {
|
||||
fwrite($conn, $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (feof($upstream)) {
|
||||
break;
|
||||
}
|
||||
$read = [$upstream, $conn];
|
||||
}
|
||||
|
||||
phpt_wait();
|
||||
CODE;
|
||||
|
||||
include 'CertificateGenerator.inc';
|
||||
$certificateGenerator = new CertificateGenerator();
|
||||
$certificateGenerator->saveCaCert($cacertFile);
|
||||
$certificateGenerator->saveNewCertAsFileWithKey($peerName, $certFile);
|
||||
|
||||
include 'ServerClientTestCase.inc';
|
||||
ServerClientTestCase::getInstance()->run($clientCode, [
|
||||
'server' => $serverCode,
|
||||
'proxy' => $proxyCode,
|
||||
]);
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
@unlink(__DIR__ . DIRECTORY_SEPARATOR . 'bug77390.pem.tmp');
|
||||
@unlink(__DIR__ . DIRECTORY_SEPARATOR . 'bug77390-ca.pem.tmp');
|
||||
?>
|
||||
--EXPECT--
|
||||
string(0) ""
|
||||
string(12) "hello, world"
|
||||
+13
-21
@@ -2453,30 +2453,22 @@ static int php_openssl_sockop_set_option(php_stream *stream, int option, int val
|
||||
alive = 0;
|
||||
} else if (php_pollfd_for(sslsock->s.socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
|
||||
if (sslsock->ssl_active) {
|
||||
int n;
|
||||
|
||||
do {
|
||||
n = SSL_peek(sslsock->ssl_handle, &buf, sizeof(buf));
|
||||
if (n <= 0) {
|
||||
int err = SSL_get_error(sslsock->ssl_handle, n);
|
||||
|
||||
if (err == SSL_ERROR_SYSCALL) {
|
||||
int n = SSL_peek(sslsock->ssl_handle, &buf, sizeof(buf));
|
||||
if (n <= 0) {
|
||||
int err = SSL_get_error(sslsock->ssl_handle, n);
|
||||
switch (err) {
|
||||
case SSL_ERROR_SYSCALL:
|
||||
alive = php_socket_errno() == EAGAIN;
|
||||
break;
|
||||
}
|
||||
|
||||
if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) {
|
||||
/* re-negotiate */
|
||||
continue;
|
||||
}
|
||||
|
||||
/* any other problem is a fatal error */
|
||||
alive = 0;
|
||||
case SSL_ERROR_WANT_READ:
|
||||
case SSL_ERROR_WANT_WRITE:
|
||||
alive = 1;
|
||||
break;
|
||||
default:
|
||||
/* any other problem is a fatal error */
|
||||
alive = 0;
|
||||
}
|
||||
/* either peek succeeded or there was an error; we
|
||||
* have set the alive flag appropriately */
|
||||
break;
|
||||
} while (1);
|
||||
}
|
||||
} else if (0 == recv(sslsock->s.socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EAGAIN) {
|
||||
alive = 0;
|
||||
}
|
||||
|
||||
@@ -1273,6 +1273,12 @@ static void pcntl_siginfo_to_zval(int signo, siginfo_t *siginfo, zval *user_sigi
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
#if defined(SIGRTMIN) && defined(SIGRTMAX)
|
||||
if (SIGRTMIN <= signo && signo <= SIGRTMAX) {
|
||||
add_assoc_long_ex(user_siginfo, "pid", sizeof("pid")-1, siginfo->si_pid);
|
||||
add_assoc_long_ex(user_siginfo, "uid", sizeof("uid")-1, siginfo->si_uid);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
pcntl_signal() context of realtime signal
|
||||
--SKIPIF--
|
||||
<?php if (!defined('SIGRTMIN')) die("skip realtime signal not supported"); ?>
|
||||
<?php if (!extension_loaded("pcntl")) print "skip"; ?>
|
||||
<?php if (!extension_loaded("posix")) die("skip posix extension not available"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
pcntl_signal(SIGRTMIN, function ($signo, $siginfo) {
|
||||
printf("got realtime signal from %s, ruid:%s\n", $siginfo['pid'] ?? '', $siginfo['uid'] ?? '');
|
||||
});
|
||||
posix_kill(posix_getpid(), SIGRTMIN);
|
||||
pcntl_signal_dispatch();
|
||||
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
%rgot realtime signal from \d+, ruid:\d+%r
|
||||
ok
|
||||
@@ -484,6 +484,12 @@ static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_
|
||||
case PDO_MYSQL_ATTR_MAX_BUFFER_SIZE:
|
||||
ZVAL_LONG(return_value, H->max_buffer_size);
|
||||
break;
|
||||
#else
|
||||
case PDO_MYSQL_ATTR_LOCAL_INFILE:
|
||||
ZVAL_BOOL(
|
||||
return_value,
|
||||
(H->server->data->options->flags & CLIENT_LOCAL_FILES) == CLIENT_LOCAL_FILES);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
@@ -769,6 +775,15 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
|
||||
CLIENT_SSL_DONT_VERIFY_SERVER_CERT;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
#if defined(MYSQL_OPT_LOCAL_INFILE) || defined(PDO_USE_MYSQLND)
|
||||
// in case there are no driver options disable 'local infile' explicitly
|
||||
zend_long local_infile = 0;
|
||||
if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE, (const char *)&local_infile)) {
|
||||
pdo_mysql_error(dbh);
|
||||
goto cleanup;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ MySQLPDOTest::skip();
|
||||
try {
|
||||
$db = new PDO($dsn, $user, $pass, array($option => $value));
|
||||
if (!is_object($db) || ($value !== ($tmp = @$db->getAttribute($option))))
|
||||
printf("[%03d] Execting '%s'/%s got '%s'/%s' for options '%s'\n",
|
||||
printf("[%03d] Expecting '%s'/%s got '%s'/%s' for options '%s'\n",
|
||||
$offset,
|
||||
$value, gettype($value),
|
||||
$tmp, gettype($tmp),
|
||||
@@ -172,8 +172,7 @@ MySQLPDOTest::skip();
|
||||
[016] PDO::MYSQL_ATTR_DIRECT_QUERY should be on
|
||||
[017] PDO::ATTR_EMULATE_PREPARES should be off
|
||||
[018] PDO::MYSQL_ATTR_DIRECT_QUERY should be off
|
||||
[021] Execting '1'/boolean got ''/boolean' for options 'PDO::MYSQL_ATTR_LOCAL_INFILE'
|
||||
[023] Execting 'SET @a=1'/string got ''/boolean' for options 'PDO::MYSQL_ATTR_INIT_COMMAND'
|
||||
[023] Expecting 'SET @a=1'/string got ''/boolean' for options 'PDO::MYSQL_ATTR_INIT_COMMAND'
|
||||
[024] SQLSTATE[42000] [1065] Query was empty
|
||||
[025] SQLSTATE[42S02] [1146] Table '%s.nonexistent' doesn't exist
|
||||
done!
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
ensure default for local infile is off
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
|
||||
MySQLPDOTest::skip();
|
||||
if (!MYSQLPDOTest::isPDOMySQLnd())
|
||||
die("skip mysqlnd only test");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc');
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
|
||||
|
||||
$dsn = MySQLPDOTest::getDSN();
|
||||
$user = PDO_MYSQL_TEST_USER;
|
||||
$pass = PDO_MYSQL_TEST_PASS;
|
||||
|
||||
$db = new PDO($dsn, $user, $pass);
|
||||
echo var_export($db->getAttribute(PDO::MYSQL_ATTR_LOCAL_INFILE)), "\n";
|
||||
echo "done!\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
false
|
||||
done!
|
||||
@@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
enable local infile
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
|
||||
MySQLPDOTest::skip();
|
||||
if (!MYSQLPDOTest::isPDOMySQLnd())
|
||||
die("skip mysqlnd only test");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc');
|
||||
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
|
||||
|
||||
$dsn = MySQLPDOTest::getDSN();
|
||||
$user = PDO_MYSQL_TEST_USER;
|
||||
$pass = PDO_MYSQL_TEST_PASS;
|
||||
|
||||
$db = new PDO($dsn, $user, $pass, array(PDO::MYSQL_ATTR_LOCAL_INFILE => true));
|
||||
echo var_export($db->getAttribute(PDO::MYSQL_ATTR_LOCAL_INFILE)), "\n";
|
||||
echo "done!\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
true
|
||||
done!
|
||||
+90
-13
@@ -435,25 +435,102 @@ static int oci_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val) /
|
||||
zend_long lval = zval_get_long(val);
|
||||
pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data;
|
||||
|
||||
if (attr == PDO_ATTR_AUTOCOMMIT) {
|
||||
if (dbh->in_txn) {
|
||||
/* Assume they want to commit whatever is outstanding */
|
||||
H->last_err = OCITransCommit(H->svc, H->err, 0);
|
||||
switch (attr) {
|
||||
case PDO_ATTR_AUTOCOMMIT:
|
||||
{
|
||||
if (dbh->in_txn) {
|
||||
/* Assume they want to commit whatever is outstanding */
|
||||
H->last_err = OCITransCommit(H->svc, H->err, 0);
|
||||
|
||||
if (H->last_err) {
|
||||
H->last_err = oci_drv_error("OCITransCommit");
|
||||
return 0;
|
||||
}
|
||||
dbh->in_txn = 0;
|
||||
}
|
||||
|
||||
dbh->auto_commit = (unsigned int)lval? 1 : 0;
|
||||
return 1;
|
||||
}
|
||||
case PDO_ATTR_PREFETCH:
|
||||
{
|
||||
H->prefetch = pdo_oci_sanitize_prefetch(lval);
|
||||
return 1;
|
||||
}
|
||||
case PDO_OCI_ATTR_ACTION:
|
||||
{
|
||||
#if (OCI_MAJOR_VERSION >= 10)
|
||||
zend_string *action = zval_get_string(val);
|
||||
|
||||
H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION,
|
||||
(dvoid *) ZSTR_VAL(action), (ub4) ZSTR_LEN(action),
|
||||
OCI_ATTR_ACTION, H->err);
|
||||
if (H->last_err) {
|
||||
H->last_err = oci_drv_error("OCITransCommit");
|
||||
oci_drv_error("OCIAttrSet: OCI_ATTR_ACTION");
|
||||
return 0;
|
||||
}
|
||||
dbh->in_txn = 0;
|
||||
return 1;
|
||||
#else
|
||||
oci_drv_error("Unsupported attribute type");
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
case PDO_OCI_ATTR_CLIENT_INFO:
|
||||
{
|
||||
#if (OCI_MAJOR_VERSION >= 10)
|
||||
zend_string *client_info = zval_get_string(val);
|
||||
|
||||
dbh->auto_commit = (unsigned int)lval? 1 : 0;
|
||||
return 1;
|
||||
} else if (attr == PDO_ATTR_PREFETCH) {
|
||||
H->prefetch = pdo_oci_sanitize_prefetch(lval);
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION,
|
||||
(dvoid *) ZSTR_VAL(client_info), (ub4) ZSTR_LEN(client_info),
|
||||
OCI_ATTR_CLIENT_INFO, H->err);
|
||||
if (H->last_err) {
|
||||
oci_drv_error("OCIAttrSet: OCI_ATTR_CLIENT_INFO");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
#else
|
||||
oci_drv_error("Unsupported attribute type");
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
case PDO_OCI_ATTR_CLIENT_IDENTIFIER:
|
||||
{
|
||||
#if (OCI_MAJOR_VERSION >= 10)
|
||||
zend_string *identifier = zval_get_string(val);
|
||||
|
||||
H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION,
|
||||
(dvoid *) ZSTR_VAL(identifier), (ub4) ZSTR_LEN(identifier),
|
||||
OCI_ATTR_CLIENT_IDENTIFIER, H->err);
|
||||
if (H->last_err) {
|
||||
oci_drv_error("OCIAttrSet: OCI_ATTR_CLIENT_IDENTIFIER");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
#else
|
||||
oci_drv_error("Unsupported attribute type");
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
case PDO_OCI_ATTR_MODULE:
|
||||
{
|
||||
#if (OCI_MAJOR_VERSION >= 10)
|
||||
zend_string *module = zval_get_string(val);
|
||||
|
||||
H->last_err = OCIAttrSet(H->session, OCI_HTYPE_SESSION,
|
||||
(dvoid *) ZSTR_VAL(module), (ub4) ZSTR_LEN(module),
|
||||
OCI_ATTR_MODULE, H->err);
|
||||
if (H->last_err) {
|
||||
oci_drv_error("OCIAttrSet: OCI_ATTR_MODULE");
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
#else
|
||||
oci_drv_error("Unsupported attribute type");
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -90,6 +90,11 @@ static MUTEX_T pdo_oci_env_mutex;
|
||||
*/
|
||||
PHP_MINIT_FUNCTION(pdo_oci)
|
||||
{
|
||||
REGISTER_PDO_CLASS_CONST_LONG("OCI_ATTR_ACTION", (zend_long)PDO_OCI_ATTR_ACTION);
|
||||
REGISTER_PDO_CLASS_CONST_LONG("OCI_ATTR_CLIENT_INFO", (zend_long)PDO_OCI_ATTR_CLIENT_INFO);
|
||||
REGISTER_PDO_CLASS_CONST_LONG("OCI_ATTR_CLIENT_IDENTIFIER", (zend_long)PDO_OCI_ATTR_CLIENT_IDENTIFIER);
|
||||
REGISTER_PDO_CLASS_CONST_LONG("OCI_ATTR_MODULE", (zend_long)PDO_OCI_ATTR_MODULE);
|
||||
|
||||
php_pdo_register_driver(&pdo_oci_driver);
|
||||
|
||||
// Defer OCI init to PHP_RINIT_FUNCTION because with php-fpm,
|
||||
|
||||
@@ -98,3 +98,11 @@ extern const struct pdo_stmt_methods oci_stmt_methods;
|
||||
|
||||
/* Arbitrary assumed row length for prefetch memory limit calcuation */
|
||||
#define PDO_OCI_PREFETCH_ROWSIZE 1024
|
||||
|
||||
|
||||
enum {
|
||||
PDO_OCI_ATTR_ACTION = PDO_ATTR_DRIVER_SPECIFIC,
|
||||
PDO_OCI_ATTR_CLIENT_INFO,
|
||||
PDO_OCI_ATTR_CLIENT_IDENTIFIER,
|
||||
PDO_OCI_ATTR_MODULE
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
--TEST--
|
||||
PDO_OCI: Attribute: Setting session action
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
|
||||
require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
|
||||
PDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc');
|
||||
|
||||
$query = 'select action from v$session where sid = sys_context(\'USERENV\', \'SID\')';
|
||||
|
||||
$dbh = PDOTest::factory();
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'ACTION NOT SET: ';
|
||||
var_dump($row['action']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_ACTION, "some action"));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'ACTION SET: ';
|
||||
var_dump($row['action']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_ACTION, "something else!"));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'ACTION RESET: ';
|
||||
var_dump($row['action']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_ACTION, null));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'ACTION NULLED: ';
|
||||
var_dump($row['action']);
|
||||
|
||||
echo "Done\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
ACTION NOT SET: NULL
|
||||
bool(true)
|
||||
ACTION SET: string(11) "some action"
|
||||
bool(true)
|
||||
ACTION RESET: string(15) "something else!"
|
||||
bool(true)
|
||||
ACTION NULLED: NULL
|
||||
Done
|
||||
@@ -0,0 +1,55 @@
|
||||
--TEST--
|
||||
PDO_OCI: Attribute: Setting session client identifier
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
|
||||
require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
|
||||
PDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc');
|
||||
|
||||
$query = 'select client_identifier from v$session where sid = sys_context(\'USERENV\', \'SID\')';
|
||||
|
||||
$dbh = PDOTest::factory();
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'CLIENT_IDENTIFIER NOT SET: ';
|
||||
var_dump($row['client_identifier']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_CLIENT_IDENTIFIER, "some client identifier"));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'CLIENT_IDENTIFIER SET: ';
|
||||
var_dump($row['client_identifier']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_CLIENT_IDENTIFIER, "something else!"));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'CLIENT_IDENTIFIER RESET: ';
|
||||
var_dump($row['client_identifier']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_CLIENT_IDENTIFIER, null));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'CLIENT_IDENTIFIER NULLED: ';
|
||||
var_dump($row['client_identifier']);
|
||||
|
||||
echo "Done\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
CLIENT_IDENTIFIER NOT SET: NULL
|
||||
bool(true)
|
||||
CLIENT_IDENTIFIER SET: string(22) "some client identifier"
|
||||
bool(true)
|
||||
CLIENT_IDENTIFIER RESET: string(15) "something else!"
|
||||
bool(true)
|
||||
CLIENT_IDENTIFIER NULLED: NULL
|
||||
Done
|
||||
@@ -0,0 +1,55 @@
|
||||
--TEST--
|
||||
PDO_OCI: Attribute: Setting session client info
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
|
||||
require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
|
||||
PDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc');
|
||||
|
||||
$query = 'select client_info from v$session where sid = sys_context(\'USERENV\', \'SID\')';
|
||||
|
||||
$dbh = PDOTest::factory();
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'CLIENT_INFO NOT SET: ';
|
||||
var_dump($row['client_info']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_CLIENT_INFO, "some client info"));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'CLIENT_INFO SET: ';
|
||||
var_dump($row['client_info']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_CLIENT_INFO, "something else!"));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'CLIENT_INFO RESET: ';
|
||||
var_dump($row['client_info']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_CLIENT_INFO, null));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'CLIENT_INFO NULLED: ';
|
||||
var_dump($row['client_info']);
|
||||
|
||||
echo "Done\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
CLIENT_INFO NOT SET: NULL
|
||||
bool(true)
|
||||
CLIENT_INFO SET: string(16) "some client info"
|
||||
bool(true)
|
||||
CLIENT_INFO RESET: string(15) "something else!"
|
||||
bool(true)
|
||||
CLIENT_INFO NULLED: NULL
|
||||
Done
|
||||
@@ -0,0 +1,49 @@
|
||||
--TEST--
|
||||
PDO_OCI: Attribute: Setting session module
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
|
||||
require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
|
||||
PDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc');
|
||||
|
||||
$query = 'select module from v$session where sid = sys_context(\'USERENV\', \'SID\')';
|
||||
|
||||
$dbh = PDOTest::factory();
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_MODULE, "some module"));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'MODULE SET: ';
|
||||
var_dump($row['module']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_MODULE, "something else!"));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'MODULE RESET: ';
|
||||
var_dump($row['module']);
|
||||
|
||||
var_dump($dbh->setAttribute(PDO::OCI_ATTR_MODULE, null));
|
||||
|
||||
$stmt = $dbh->query($query);
|
||||
$row = $stmt->fetch();
|
||||
echo 'MODULE NULLED: ';
|
||||
var_dump($row['module']);
|
||||
|
||||
echo "Done\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
MODULE SET: string(11) "some module"
|
||||
bool(true)
|
||||
MODULE RESET: string(15) "something else!"
|
||||
bool(true)
|
||||
MODULE NULLED: NULL
|
||||
Done
|
||||
@@ -0,0 +1,64 @@
|
||||
--TEST--
|
||||
PDO OCI specific class constants
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
|
||||
require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
|
||||
PDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc');
|
||||
|
||||
$expected = [
|
||||
'OCI_ATTR_CLIENT_INFO' => true,
|
||||
'OCI_ATTR_ACTION' => true,
|
||||
'OCI_ATTR_CLIENT_IDENTIFIER' => true,
|
||||
'OCI_ATTR_MODULE' => true,
|
||||
];
|
||||
|
||||
$ref = new ReflectionClass('PDO');
|
||||
$constants = $ref->getConstants();
|
||||
$values = [];
|
||||
|
||||
foreach ($constants as $name => $value) {
|
||||
if (substr($name, 0, 8) == 'OCI_ATTR') {
|
||||
if (!isset($values[$value])) {
|
||||
$values[$value] = [$name];
|
||||
} else {
|
||||
$values[$value][] = $name;
|
||||
}
|
||||
|
||||
if (isset($expected[$name])) {
|
||||
unset($expected[$name]);
|
||||
unset($constants[$name]);
|
||||
}
|
||||
|
||||
} else {
|
||||
unset($constants[$name]);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($constants)) {
|
||||
printf("[001] Dumping list of unexpected constants\n");
|
||||
var_dump($constants);
|
||||
}
|
||||
|
||||
if (!empty($expected)) {
|
||||
printf("[002] Dumping list of missing constants\n");
|
||||
var_dump($expected);
|
||||
}
|
||||
|
||||
if (!empty($values)) {
|
||||
foreach ($values as $value => $constants) {
|
||||
if (count($constants) > 1) {
|
||||
printf("[003] Several constants share the same value '%s'\n", $value);
|
||||
var_dump($constants);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "done!";
|
||||
--EXPECT--
|
||||
done!
|
||||
@@ -1403,6 +1403,9 @@ int phar_create_or_parse_filename(char *fname, size_t fname_len, char *alias, si
|
||||
/* set up our manifest */
|
||||
mydata = ecalloc(1, sizeof(phar_archive_data));
|
||||
mydata->fname = expand_filepath(fname, NULL);
|
||||
if (mydata->fname == NULL) {
|
||||
return FAILURE;
|
||||
}
|
||||
fname_len = strlen(mydata->fname);
|
||||
#ifdef PHP_WIN32
|
||||
phar_unixify_path_separators(mydata->fname, fname_len);
|
||||
|
||||
+6
-1
@@ -764,7 +764,12 @@ static int phar_tar_writeheaders_int(phar_entry_info *entry, void *argument) /*
|
||||
header.typeflag = entry->tar_type;
|
||||
|
||||
if (entry->link) {
|
||||
strncpy(header.linkname, entry->link, strlen(entry->link));
|
||||
if (strlcpy(header.linkname, entry->link, sizeof(header.linkname)) >= sizeof(header.linkname)) {
|
||||
if (fp->error) {
|
||||
spprintf(fp->error, 4096, "tar-based phar \"%s\" cannot be created, link \"%s\" is too long for format", entry->phar->fname, entry->link);
|
||||
}
|
||||
return ZEND_HASH_APPLY_STOP;
|
||||
}
|
||||
}
|
||||
|
||||
strncpy(header.magic, "ustar", sizeof("ustar")-1);
|
||||
|
||||
@@ -13,5 +13,6 @@ DONE
|
||||
<?php
|
||||
@unlink(__DIR__."/bug71488.test");
|
||||
?>
|
||||
--EXPECT--
|
||||
DONE
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught BadMethodCallException: tar-based phar "%s/bug71488.test" cannot be created, link "%s" is too long for format in %sbug71488.php:%d
|
||||
Stack trace:%A
|
||||
@@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Bug #77396 Relative filename exceeding maximum path length causes null pointer dereference.
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$path = '../' . str_repeat("x", PHP_MAXPATHLEN) . '.tar';
|
||||
$phar = new PharData($path);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught UnexpectedValueException: Phar creation or opening failed in %s%ebug77396.php:%d
|
||||
Stack trace:
|
||||
#0 %s%ebug77396.php(%d): PharData->__construct(%s)
|
||||
#1 {main}
|
||||
thrown in %s%ebug77396.php on line %d
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #77586 Symbolic link names in tar-formatted phar must be less than 100 bytes.
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar") || true /* blocked by bug 65332 */) die("skip"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$dir = __DIR__."/bug77586";
|
||||
$phar = new PharData($dir . "/bug77586.tar");
|
||||
$phar->buildFromDirectory($dir . "/files");
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
$dir = __DIR__."/bug77586";
|
||||
unlink($dir . "/bug77586.tar");
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught PharException: tar-based phar "%s/bug77586.tar" cannot be created, link "%s" is too long for format %s
|
||||
Stack trace:
|
||||
#0 %s/bug77586.php(%d): PharData->buildFromDirectory('%s')
|
||||
#1 {main}
|
||||
thrown in %s/bug77586.php %s on line %d
|
||||
+1
@@ -0,0 +1 @@
|
||||
target
|
||||
+15
-6
@@ -212,12 +212,21 @@ static inline void spl_filesystem_object_get_file_name(spl_filesystem_object *in
|
||||
}
|
||||
break;
|
||||
case SPL_FS_DIR:
|
||||
if (intern->file_name) {
|
||||
efree(intern->file_name);
|
||||
{
|
||||
size_t path_len = 0;
|
||||
char *path = spl_filesystem_object_get_path(intern, &path_len);
|
||||
if (intern->file_name) {
|
||||
efree(intern->file_name);
|
||||
}
|
||||
/* if there is parent path, ammend it, otherwise just use the given path as is */
|
||||
if (path_len == 0) {
|
||||
intern->file_name_len = spprintf(
|
||||
&intern->file_name, 0, "%s", intern->u.dir.entry.d_name);
|
||||
} else {
|
||||
intern->file_name_len = spprintf(
|
||||
&intern->file_name, 0, "%s%c%s", path, slash, intern->u.dir.entry.d_name);
|
||||
}
|
||||
}
|
||||
intern->file_name_len = spprintf(&intern->file_name, 0, "%s%c%s",
|
||||
spl_filesystem_object_get_path(intern, NULL),
|
||||
slash, intern->u.dir.entry.d_name);
|
||||
break;
|
||||
}
|
||||
} /* }}} */
|
||||
@@ -1124,7 +1133,7 @@ SPL_METHOD(SplFileInfo, __construct)
|
||||
char *path;
|
||||
size_t len;
|
||||
|
||||
if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "s", &path, &len) == FAILURE) {
|
||||
if (zend_parse_parameters_throw(ZEND_NUM_ARGS(), "p", &path, &len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
--TEST--
|
||||
SPL: glob wrapper interactions with DirectoryIterator
|
||||
--FILE--
|
||||
<?php
|
||||
touch('bug.51068');
|
||||
mkdir('bug.51068.dir');
|
||||
touch('bug.51068.dir/lvl2.bug.51068');
|
||||
$iter = new DirectoryIterator('glob://*.51068');
|
||||
foreach ($iter as $f) {
|
||||
var_dump($f->getFilename());
|
||||
var_dump($f->getSize());
|
||||
}
|
||||
$iter = new DirectoryIterator('glob://bug.51068.dir/*.51068');
|
||||
foreach ($iter as $f) {
|
||||
var_dump($f->getFilename());
|
||||
var_dump($f->getSize());
|
||||
}
|
||||
$iter = new DirectoryIterator('glob://bug.51068.dir');
|
||||
foreach ($iter as $f) {
|
||||
var_dump($f->getFilename());
|
||||
var_dump($f->getSize() >= 0);
|
||||
}
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink('bug.51068');
|
||||
unlink('bug.51068.dir/lvl2.bug.51068');
|
||||
rmdir('bug.51068.dir');
|
||||
?>
|
||||
--EXPECT--
|
||||
string(9) "bug.51068"
|
||||
int(0)
|
||||
string(14) "lvl2.bug.51068"
|
||||
int(0)
|
||||
string(13) "bug.51068.dir"
|
||||
bool(true)
|
||||
@@ -0,0 +1,9 @@
|
||||
--TEST--
|
||||
Bug #77431 (SplFileInfo::__construct() accepts NUL bytes)
|
||||
--FILE--
|
||||
<?php
|
||||
new SplFileInfo("bad\0good");
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught TypeError: SplFileInfo::__construct() expects parameter 1 to be a valid path, string given in %s:%d
|
||||
Stack trace:%A
|
||||
+35
-51
@@ -30,6 +30,7 @@
|
||||
#endif
|
||||
|
||||
#include "php_globals.h"
|
||||
#include "zend_smart_str.h"
|
||||
|
||||
|
||||
/* Implementation of the language Header() function */
|
||||
@@ -81,12 +82,10 @@ PHPAPI int php_header(void)
|
||||
|
||||
PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires, zend_string *path, zend_string *domain, int secure, int httponly, zend_string *samesite, int url_encode)
|
||||
{
|
||||
char *cookie;
|
||||
size_t len = sizeof("Set-Cookie: ");
|
||||
zend_string *dt;
|
||||
sapi_header_line ctr = {0};
|
||||
int result;
|
||||
zend_string *encoded_value = NULL;
|
||||
smart_str buf = {0};
|
||||
|
||||
if (!ZSTR_LEN(name)) {
|
||||
zend_error( E_WARNING, "Cookie names must not be empty" );
|
||||
@@ -112,29 +111,6 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires,
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
len += ZSTR_LEN(name);
|
||||
if (value) {
|
||||
if (url_encode) {
|
||||
encoded_value = php_url_encode(ZSTR_VAL(value), ZSTR_LEN(value));
|
||||
len += ZSTR_LEN(encoded_value);
|
||||
} else {
|
||||
encoded_value = zend_string_copy(value);
|
||||
len += ZSTR_LEN(encoded_value);
|
||||
}
|
||||
}
|
||||
|
||||
if (path) {
|
||||
len += ZSTR_LEN(path);
|
||||
}
|
||||
if (domain) {
|
||||
len += ZSTR_LEN(domain);
|
||||
}
|
||||
if (samesite) {
|
||||
len += ZSTR_LEN(samesite);
|
||||
}
|
||||
|
||||
cookie = emalloc(len + 100);
|
||||
|
||||
if (value == NULL || ZSTR_LEN(value) == 0) {
|
||||
/*
|
||||
* MSIE doesn't delete a cookie when you set it to a null value
|
||||
@@ -142,67 +118,75 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires,
|
||||
* pick an expiry date in the past
|
||||
*/
|
||||
dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, 1, 0);
|
||||
snprintf(cookie, len + 100, "Set-Cookie: %s=deleted; expires=%s; Max-Age=0", ZSTR_VAL(name), ZSTR_VAL(dt));
|
||||
smart_str_appends(&buf, "Set-Cookie: ");
|
||||
smart_str_append(&buf, name);
|
||||
smart_str_appends(&buf, "=deleted; expires=");
|
||||
smart_str_append(&buf, dt);
|
||||
smart_str_appends(&buf, "; Max-Age=0");
|
||||
zend_string_free(dt);
|
||||
} else {
|
||||
snprintf(cookie, len + 100, "Set-Cookie: %s=%s", ZSTR_VAL(name), value ? ZSTR_VAL(encoded_value) : "");
|
||||
smart_str_appends(&buf, "Set-Cookie: ");
|
||||
smart_str_append(&buf, name);
|
||||
smart_str_appendc(&buf, '=');
|
||||
if (url_encode) {
|
||||
zend_string *encoded_value = php_url_encode(ZSTR_VAL(value), ZSTR_LEN(value));
|
||||
smart_str_append(&buf, encoded_value);
|
||||
zend_string_release_ex(encoded_value, 0);
|
||||
} else {
|
||||
smart_str_append(&buf, value);
|
||||
}
|
||||
if (expires > 0) {
|
||||
const char *p;
|
||||
char tsdelta[13];
|
||||
double diff;
|
||||
|
||||
strlcat(cookie, COOKIE_EXPIRES, len + 100);
|
||||
smart_str_appends(&buf, COOKIE_EXPIRES);
|
||||
dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, expires, 0);
|
||||
/* check to make sure that the year does not exceed 4 digits in length */
|
||||
p = zend_memrchr(ZSTR_VAL(dt), '-', ZSTR_LEN(dt));
|
||||
if (!p || *(p + 5) != ' ') {
|
||||
zend_string_free(dt);
|
||||
efree(cookie);
|
||||
zend_string_release_ex(encoded_value, 0);
|
||||
smart_str_free(&buf);
|
||||
zend_error(E_WARNING, "Expiry date cannot have a year greater than 9999");
|
||||
return FAILURE;
|
||||
}
|
||||
strlcat(cookie, ZSTR_VAL(dt), len + 100);
|
||||
|
||||
smart_str_append(&buf, dt);
|
||||
zend_string_free(dt);
|
||||
|
||||
diff = difftime(expires, time(NULL));
|
||||
if (diff < 0) {
|
||||
diff = 0;
|
||||
}
|
||||
snprintf(tsdelta, sizeof(tsdelta), ZEND_LONG_FMT, (zend_long) diff);
|
||||
strlcat(cookie, COOKIE_MAX_AGE, len + 100);
|
||||
strlcat(cookie, tsdelta, len + 100);
|
||||
|
||||
smart_str_appends(&buf, COOKIE_MAX_AGE);
|
||||
smart_str_append_long(&buf, (zend_long) diff);
|
||||
}
|
||||
}
|
||||
|
||||
if (encoded_value) {
|
||||
zend_string_release_ex(encoded_value, 0);
|
||||
}
|
||||
|
||||
if (path && ZSTR_LEN(path)) {
|
||||
strlcat(cookie, COOKIE_PATH, len + 100);
|
||||
strlcat(cookie, ZSTR_VAL(path), len + 100);
|
||||
smart_str_appends(&buf, COOKIE_PATH);
|
||||
smart_str_append(&buf, path);
|
||||
}
|
||||
if (domain && ZSTR_LEN(domain)) {
|
||||
strlcat(cookie, COOKIE_DOMAIN, len + 100);
|
||||
strlcat(cookie, ZSTR_VAL(domain), len + 100);
|
||||
smart_str_appends(&buf, COOKIE_DOMAIN);
|
||||
smart_str_append(&buf, domain);
|
||||
}
|
||||
if (secure) {
|
||||
strlcat(cookie, COOKIE_SECURE, len + 100);
|
||||
smart_str_appends(&buf, COOKIE_SECURE);
|
||||
}
|
||||
if (httponly) {
|
||||
strlcat(cookie, COOKIE_HTTPONLY, len + 100);
|
||||
smart_str_appends(&buf, COOKIE_HTTPONLY);
|
||||
}
|
||||
if (samesite && ZSTR_LEN(samesite)) {
|
||||
strlcat(cookie, COOKIE_SAMESITE, len + 100);
|
||||
strlcat(cookie, ZSTR_VAL(samesite), len + 100);
|
||||
smart_str_appends(&buf, COOKIE_SAMESITE);
|
||||
smart_str_append(&buf, samesite);
|
||||
}
|
||||
|
||||
ctr.line = cookie;
|
||||
ctr.line_len = (uint32_t)strlen(cookie);
|
||||
ctr.line = ZSTR_VAL(buf.s);
|
||||
ctr.line_len = (uint32_t) ZSTR_LEN(buf.s);
|
||||
|
||||
result = sapi_header_op(SAPI_HEADER_ADD, &ctr);
|
||||
efree(cookie);
|
||||
zend_string_release(buf.s);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -190,15 +190,6 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
|
||||
case IS_TRUE:
|
||||
smart_str_appendl(formstr, "1", sizeof("1")-1);
|
||||
break;
|
||||
case IS_DOUBLE:
|
||||
{
|
||||
char *ekey;
|
||||
size_t ekey_len;
|
||||
ekey_len = spprintf(&ekey, 0, "%.*G", (int) EG(precision), Z_DVAL_P(zdata));
|
||||
smart_str_appendl(formstr, ekey, ekey_len);
|
||||
efree(ekey);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
zend_string *ekey;
|
||||
|
||||
+1
-1
@@ -273,7 +273,7 @@ PHP_FUNCTION(iptcembed)
|
||||
iptcdata_len++; /* make the length even */
|
||||
}
|
||||
|
||||
psheader[ 2 ] = (char) (iptcdata_len+28)>>8;
|
||||
psheader[ 2 ] = (char) ((iptcdata_len+28)>>8);
|
||||
psheader[ 3 ] = (iptcdata_len+28)&0xff;
|
||||
|
||||
for (inx = 0; inx < 28; inx++) {
|
||||
|
||||
@@ -59,10 +59,10 @@ $values = array(
|
||||
/*20*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*21*/ @undefined_var,
|
||||
/*21*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*22*/ @unset_var
|
||||
/*22*/ @$unset_var
|
||||
|
||||
);
|
||||
|
||||
@@ -303,23 +303,23 @@ NULL
|
||||
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
@@ -62,10 +62,10 @@ $values = array (
|
||||
/*21*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*22*/ @undefined_var,
|
||||
/*22*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*23*/ @unset_var
|
||||
/*23*/ @$unset_var
|
||||
|
||||
);
|
||||
|
||||
@@ -407,23 +407,23 @@ NULL
|
||||
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
|
||||
-- Iteration 23 --
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
|
||||
Warning: array_chunk() expects parameter 2 to be int, string given in %s on line %d
|
||||
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
|
||||
NULL
|
||||
Done
|
||||
@@ -53,10 +53,10 @@ $values = array(
|
||||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var
|
||||
/*18*/ @$unset_var
|
||||
|
||||
);
|
||||
|
||||
|
||||
@@ -63,10 +63,10 @@ $unexpected_values = array (
|
||||
19 => new stdclass(),
|
||||
|
||||
// undefined data
|
||||
20 => @undefined_var,
|
||||
20 => @$undefined_var,
|
||||
|
||||
// unset data
|
||||
21 => @unset_var,
|
||||
21 => @$unset_var,
|
||||
|
||||
// resource variable
|
||||
22 => $fp
|
||||
@@ -99,301 +99,301 @@ echo "Done";
|
||||
-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
|
||||
-- Iteration 1 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 2 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 3 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 4 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, int given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 5 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 6 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 7 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 8 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 9 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, float given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 10 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 11 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 12 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 13 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 14 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 15 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, bool given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 16 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 17 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 20 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 23 --
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
|
||||
Warning: arsort() expects parameter 1 to be array, resource given in %s on line %d
|
||||
bool(false)
|
||||
Done
|
||||
@@ -59,10 +59,10 @@ $unexpected_values = array(
|
||||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var,
|
||||
/*18*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*19*/ $fp
|
||||
@@ -211,7 +211,7 @@ array(3) {
|
||||
}
|
||||
-- Iteration 13 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
@@ -223,7 +223,7 @@ array(3) {
|
||||
}
|
||||
-- Iteration 14 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
@@ -235,7 +235,7 @@ array(3) {
|
||||
}
|
||||
-- Iteration 15 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
@@ -247,7 +247,7 @@ array(3) {
|
||||
}
|
||||
-- Iteration 16 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
@@ -259,7 +259,7 @@ array(3) {
|
||||
}
|
||||
-- Iteration 17 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, object given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, object given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
@@ -270,32 +270,28 @@ array(3) {
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[3]=>
|
||||
int(45)
|
||||
[1]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[3]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, string given in %sarsort_variation2.php on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[3]=>
|
||||
int(45)
|
||||
[1]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[3]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 20 --
|
||||
|
||||
Warning: arsort() expects parameter 2 to be int, resource given in %sarsort_variation2.php on line %d
|
||||
Warning: arsort() expects parameter 2 to be int, resource given in %s on line %d
|
||||
bool(false)
|
||||
array(3) {
|
||||
[1]=>
|
||||
|
||||
@@ -63,10 +63,10 @@ $unexpected_values = array (
|
||||
19 => new stdclass(),
|
||||
|
||||
// undefined data
|
||||
20 => @undefined_var,
|
||||
20 => @$undefined_var,
|
||||
|
||||
// unset data
|
||||
21 => @unset_var,
|
||||
21 => @$unset_var,
|
||||
|
||||
// resource variable
|
||||
22 => $fp
|
||||
@@ -359,29 +359,29 @@ Warning: asort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: asort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: asort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 23 --
|
||||
|
||||
|
||||
@@ -59,10 +59,10 @@ $unexpected_values = array(
|
||||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var,
|
||||
/*18*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*19*/ $fp
|
||||
@@ -270,26 +270,22 @@ array(3) {
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: asort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[1]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(10)
|
||||
[3]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: asort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[1]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[1]=>
|
||||
int(10)
|
||||
[3]=>
|
||||
int(45)
|
||||
}
|
||||
|
||||
@@ -62,10 +62,10 @@ $unexpected_values = array (
|
||||
/*19*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*20*/ @undefined_var,
|
||||
/*20*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*21*/ @unset_var,
|
||||
/*21*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*22*/ $fp
|
||||
@@ -357,29 +357,29 @@ Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 23 --
|
||||
|
||||
|
||||
@@ -58,10 +58,10 @@ $unexpected_values = array (
|
||||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var,
|
||||
/*18*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*19*/ $fp
|
||||
@@ -269,28 +269,24 @@ array(3) {
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: krsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[45]=>
|
||||
int(45)
|
||||
[10]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[45]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: krsort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[45]=>
|
||||
int(45)
|
||||
[10]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[45]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 20 --
|
||||
|
||||
|
||||
@@ -61,10 +61,10 @@ $unexpected_values = array (
|
||||
/*19*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*20*/ @undefined_var,
|
||||
/*20*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*21*/ @unset_var,
|
||||
/*21*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*22*/ $fp
|
||||
@@ -357,29 +357,29 @@ Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 21 --
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 22 --
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
|
||||
Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
|
||||
Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
|
||||
bool(false)
|
||||
-- Iteration 23 --
|
||||
|
||||
|
||||
@@ -58,10 +58,10 @@ $unexpected_values = array (
|
||||
/*16*/ new stdclass(),
|
||||
|
||||
// undefined data
|
||||
/*17*/ @undefined_var,
|
||||
/*17*/ @$undefined_var,
|
||||
|
||||
// unset data
|
||||
/*18*/ @unset_var,
|
||||
/*18*/ @$unset_var,
|
||||
|
||||
// resource variable
|
||||
/*19*/ $fp
|
||||
@@ -269,26 +269,22 @@ array(3) {
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 18 --
|
||||
|
||||
Warning: ksort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[10]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[10]=>
|
||||
int(10)
|
||||
[45]=>
|
||||
int(45)
|
||||
}
|
||||
-- Iteration 19 --
|
||||
|
||||
Warning: ksort() expects parameter 2 to be int, string given in %s on line %d
|
||||
bool(false)
|
||||
bool(true)
|
||||
array(3) {
|
||||
[10]=>
|
||||
int(10)
|
||||
[2]=>
|
||||
int(2)
|
||||
[10]=>
|
||||
int(10)
|
||||
[45]=>
|
||||
int(45)
|
||||
}
|
||||
|
||||
Loaded 100 of 119 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user