mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-15 05:00:49 +00:00
Compare commits
236
Commits
php-5.2.11
...
php-5.2.12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
254298cea9 | ||
|
|
38af726f28 | ||
|
|
6c0b2a3a0e | ||
|
|
eb84243d04 | ||
|
|
3a30b7dfca | ||
|
|
2ded6af198 | ||
|
|
e4fb981bf0 | ||
|
|
0d4bf4110f | ||
|
|
6b838aa6d2 | ||
|
|
ef54c9c5ed | ||
|
|
481a5d8b18 | ||
|
|
cf9e914754 | ||
|
|
9c445100c8 | ||
|
|
ff8c39c8e9 | ||
|
|
2e9192926f | ||
|
|
6512c8669f | ||
|
|
faee4c72b8 | ||
|
|
f79bc0ac21 | ||
|
|
028ffa75f3 | ||
|
|
428088c848 | ||
|
|
9fca678c47 | ||
|
|
fcf959ad3e | ||
|
|
c21c2da229 | ||
|
|
be06106d62 | ||
|
|
cfa096dd4d | ||
|
|
69097f305c | ||
|
|
86529ad73c | ||
|
|
b109e5bd82 | ||
|
|
69ed9840ef | ||
|
|
5a64467cba | ||
|
|
553191ea5c | ||
|
|
84bc7c449c | ||
|
|
eb3a2ee1b7 | ||
|
|
596dd39fa3 | ||
|
|
1ca7c27638 | ||
|
|
aa1904f4ab | ||
|
|
565cec5cfc | ||
|
|
be62e2c702 | ||
|
|
fb44cca847 | ||
|
|
38ba16b060 | ||
|
|
3487ab7eb9 | ||
|
|
43d6b87ccb | ||
|
|
42c4e5c148 | ||
|
|
50e31fe9c1 | ||
|
|
f34f334638 | ||
|
|
87230feb91 | ||
|
|
8eb333ffa2 | ||
|
|
af0595c40b | ||
|
|
c4ec9018f5 | ||
|
|
abb6a035d3 | ||
|
|
ee12cbd751 | ||
|
|
e85a2dd296 | ||
|
|
01ba3e44b3 | ||
|
|
14909202a8 | ||
|
|
df4b288737 | ||
|
|
ea3faadf6a | ||
|
|
5ef06b0c62 | ||
|
|
fa955848f6 | ||
|
|
ce6bb055e1 | ||
|
|
6bdc96f68b | ||
|
|
fbd9757a39 | ||
|
|
a08f0425de | ||
|
|
8c3509c894 | ||
|
|
1eaf99d866 | ||
|
|
4e4cd57658 | ||
|
|
fbfef72ba5 | ||
|
|
707074aa6f | ||
|
|
50ca6f0fa1 | ||
|
|
e5f42bfd06 | ||
|
|
cb397e86ea | ||
|
|
a12e272b9a | ||
|
|
eba3dd019e | ||
|
|
bee4607345 | ||
|
|
e91b12acc7 | ||
|
|
0dc1918687 | ||
|
|
7a5348280e | ||
|
|
0dd637ea57 | ||
|
|
452ffe21a2 | ||
|
|
89a570638b | ||
|
|
87a7fa0abf | ||
|
|
84a4d1c20c | ||
|
|
54727670c3 | ||
|
|
6c621b15cd | ||
|
|
d2c593017d | ||
|
|
07db754f8d | ||
|
|
8f3677601e | ||
|
|
d3949380b8 | ||
|
|
1a174b0828 | ||
|
|
237feb2149 | ||
|
|
da729f3874 | ||
|
|
2ce1d0056d | ||
|
|
9a7db58096 | ||
|
|
456c790c63 | ||
|
|
dea8172f6d | ||
|
|
2767484162 | ||
|
|
87c7c2a3d1 | ||
|
|
0e8c20106f | ||
|
|
ff62865fc0 | ||
|
|
ae35c47a4b | ||
|
|
0d71754a2e | ||
|
|
df042dc98e | ||
|
|
38e95f692f | ||
|
|
6880bcc319 | ||
|
|
84543c1ee7 | ||
|
|
d5dacfc274 | ||
|
|
9dc54d8483 | ||
|
|
bb524935a3 | ||
|
|
1d2a24f530 | ||
|
|
c94ac24231 | ||
|
|
d6fd508045 | ||
|
|
cd1195c44e | ||
|
|
57b251cee8 | ||
|
|
67259ce03b | ||
|
|
4f8253338c | ||
|
|
4f6fa0ba12 | ||
|
|
b614214638 | ||
|
|
53952fef26 | ||
|
|
9096aef11a | ||
|
|
1d5c137b00 | ||
|
|
1e52beff0f | ||
|
|
2a481b01fb | ||
|
|
c4bee3fa96 | ||
|
|
18a433f0d9 | ||
|
|
c6b89853ef | ||
|
|
170b33dec0 | ||
|
|
2dcdcd8d5f | ||
|
|
5703dbea03 | ||
|
|
389811a6c5 | ||
|
|
b256c06592 | ||
|
|
c75d7f3af5 | ||
|
|
693e138d5d | ||
|
|
1434f64b7d | ||
|
|
44f8c63ff5 | ||
|
|
dad7ada835 | ||
|
|
9676c4b0ea | ||
|
|
4dbc65c7b7 | ||
|
|
a1fe3c1401 | ||
|
|
0b4c25d916 | ||
|
|
31a64059ca | ||
|
|
fa23faaca4 | ||
|
|
caa28c2a22 | ||
|
|
494877cbd1 | ||
|
|
b7fe1fe3d8 | ||
|
|
6105b12333 | ||
|
|
a3268aef52 | ||
|
|
094bb76bbf | ||
|
|
cf7e439938 | ||
|
|
dda3dfff9b | ||
|
|
1d51c0f7d6 | ||
|
|
7b6dce6a62 | ||
|
|
10a048bc3f | ||
|
|
0b18abd2f2 | ||
|
|
2c210cadd6 | ||
|
|
a5f518f00a | ||
|
|
91be772174 | ||
|
|
4d7a588951 | ||
|
|
1719e7c300 | ||
|
|
e5e26d817e | ||
|
|
e94965d0a7 | ||
|
|
697277d152 | ||
|
|
880b090479 | ||
|
|
c0677af865 | ||
|
|
eb9ca1bf82 | ||
|
|
33b43d710f | ||
|
|
85037bbfad | ||
|
|
22d7581a9b | ||
|
|
1bc451744f | ||
|
|
29aa08e3a8 | ||
|
|
f77a222897 | ||
|
|
ac2bdbaeb0 | ||
|
|
b46243e2e2 | ||
|
|
3ef866882a | ||
|
|
040871458c | ||
|
|
18b0a78708 | ||
|
|
e394a130f6 | ||
|
|
b8175c7919 | ||
|
|
efacbfff88 | ||
|
|
2594c77511 | ||
|
|
2595252ebf | ||
|
|
98a8665383 | ||
|
|
875c91b415 | ||
|
|
f9b8139e65 | ||
|
|
29b7b871b7 | ||
|
|
a6321016da | ||
|
|
cf2c0f3ee3 | ||
|
|
5007c77a31 | ||
|
|
bf34edee8f | ||
|
|
c21d59c08e | ||
|
|
25209f9a71 | ||
|
|
0de483dcf4 | ||
|
|
bbc9b86f0d | ||
|
|
ce1b22fd85 | ||
|
|
4c2d3cace1 | ||
|
|
67303f2999 | ||
|
|
c5d06308b1 | ||
|
|
98ce43e431 | ||
|
|
bbd230d119 | ||
|
|
d5ee6d613d | ||
|
|
4ddffe7b35 | ||
|
|
198361e012 | ||
|
|
bc72db169b | ||
|
|
5803d3b029 | ||
|
|
3758a57bba | ||
|
|
22693aa7fb | ||
|
|
6a1736de17 | ||
|
|
2b2fb3fd49 | ||
|
|
ef17ae4ecb | ||
|
|
d5cf5939f8 | ||
|
|
845bfd0a0c | ||
|
|
fc79d27624 | ||
|
|
722b937b8f | ||
|
|
cc83bf0be2 | ||
|
|
bbba732e79 | ||
|
|
8324654b13 | ||
|
|
976fbc7006 | ||
|
|
c2471b4950 | ||
|
|
4a391f68d5 | ||
|
|
5bd58e538e | ||
|
|
c0735c68da | ||
|
|
7cbdfd2757 | ||
|
|
02dd12385b | ||
|
|
5c51b3f11a | ||
|
|
ca1692fe16 | ||
|
|
c2dbf60325 | ||
|
|
d5d77c1beb | ||
|
|
88586426d4 | ||
|
|
943d08ee0f | ||
|
|
b164d2b97c | ||
|
|
76ff5590c2 | ||
|
|
4061a72664 | ||
|
|
6db1f59938 | ||
|
|
c6bc88db3a | ||
|
|
dc2f690377 | ||
|
|
b91f37fdc0 | ||
|
|
77fd5b8075 | ||
|
|
ba855e4824 |
No files matched your search
+1
-1
@@ -206,7 +206,7 @@ STATUS: Working
|
||||
SINCE: 5.1
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: pdo_pgsql
|
||||
PRIMARY MAINTAINER: Unknown
|
||||
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
|
||||
MAINTENANCE: Odd fixes
|
||||
STATUS: Working
|
||||
SINCE: 5.1
|
||||
|
||||
+4
-9
@@ -82,26 +82,21 @@ PHP_TEST_SHARED_EXTENSIONS = ` \
|
||||
|
||||
test: all
|
||||
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
|
||||
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
|
||||
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
|
||||
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
|
||||
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
|
||||
if test "$$INI_FILE"; then \
|
||||
$(EGREP) -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
|
||||
else \
|
||||
echo > $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
INI_SCANNED_PATH=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
|
||||
INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
|
||||
if test "$$INI_SCANNED_PATH"; then \
|
||||
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
|
||||
$(EGREP) -h -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
|
||||
fi; \
|
||||
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
|
||||
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
|
||||
TEST_PHP_SRCDIR=$(top_srcdir) \
|
||||
CC="$(CC)" \
|
||||
$(top_builddir)/$(SAPI_CLI_PATH) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
|
||||
else \
|
||||
echo "ERROR: Cannot run tests without CLI sapi."; \
|
||||
fi
|
||||
|
||||
@@ -1,80 +1,184 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
17 Dec 2009, PHP 5.2.12
|
||||
|
||||
- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
|
||||
single text node when using libxml2.7.3+. (Kalle)
|
||||
- Added protection for $_SESSION from interrupt corruption and improved
|
||||
"session.save_path" check. (Stas)
|
||||
- Added "max_file_uploads" INI directive, which can be set to limit the
|
||||
number of file uploads per-request to 20 by default, to prevent possible
|
||||
DOS via temporary file exhaustion. (Ilia)
|
||||
|
||||
- Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)
|
||||
- Fixed error_log() to be binary safe when using message_type 3. (Jani)
|
||||
- Fixed unnecessary invocation of setitimer when timeouts have been disabled.
|
||||
(Arvind Srinivasan)
|
||||
- Fixed crash in com_print_typeinfo when an invalid typelib is given.
|
||||
(Pierre)
|
||||
- Fixed a safe_mode bypass in tempnam() identified by Grzegorz Stachowiak.
|
||||
(Rasmus)
|
||||
- Fixed a open_basedir bypass in posix_mkfifo() identified by Grzegorz
|
||||
Stachowiak. (Rasmus)
|
||||
- Fixed crash in SQLiteDatabase::ArrayQuery() and SQLiteDatabase::SingleQuery()
|
||||
when calling using Reflection. (Felipe)
|
||||
- Fixed crash when instantiating PDORow and PDOStatement through Reflection.
|
||||
(Felipe)
|
||||
- Fixed memory leak in openssl_pkcs12_export_to_file(). (Felipe)
|
||||
|
||||
- Updated timezone database to version 2009.19 (2009s). (Derick)
|
||||
|
||||
- Changed "post_max_size" php.ini directive to allow unlimited post size by
|
||||
setting it to 0. (Rasmus)
|
||||
|
||||
- Fixed bug #50445 (PDO-ODBC stored procedure call from Solaris 64-bit causes
|
||||
segfault). (davbrown4 at yahoo dot com, Felipe)
|
||||
- Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
|
||||
(Jani)
|
||||
- Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN).
|
||||
(Ilia, Pierrick)
|
||||
- Fixed bug #50285 (xmlrpc does not preserve keys in encoded indexed arrays).
|
||||
(Felipe)
|
||||
- Fixed bug #50282 (xmlrpc_encode_request() changes object into array in
|
||||
calling function). (Felipe)
|
||||
- Fixed bug #50266 (conflicting types for llabs). (Jani)
|
||||
- Fixed bug #50255 (isset() and empty() silently casts array to object).
|
||||
(Felipe)
|
||||
- Fixed bug #50219 (soap call Segmentation fault on a redirected url).
|
||||
(Pierrick)
|
||||
- Fixed bug #50209 (Compiling with libedit cannot find readline.h).
|
||||
(tcallawa at redhat dot com)
|
||||
- Fixed bug #50207 (segmentation fault when concatenating very large strings
|
||||
on 64bit linux). (Ilia)
|
||||
- Fixed bug #50195 (pg_copy_to() fails when table name contains schema. (Ilia)
|
||||
- Fixed bug #50185 (ldap_get_entries() return false instead of an empty array
|
||||
when there is no error). (Jani)
|
||||
- Fixed bug #50174 (Incorrectly matched docComment). (Felipe)
|
||||
- Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
|
||||
non-existent file). (Dmitry)
|
||||
- Fixed bug #50162 (Memory leak when fetching timestamp column from Oracle
|
||||
database). (Felipe)
|
||||
- Fixed bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses
|
||||
containing = or ?). (Pierrick)
|
||||
- Fixed bug #50073 (parse_url() incorrect when ? in fragment). (Ilia)
|
||||
- Fixed bug #50006 (Segfault caused by uksort()). (Felipe)
|
||||
- Fixed bug #50005 (Throwing through Reflection modified Exception object makes
|
||||
segmentation fault). (Felipe)
|
||||
- Fixed bug #49990 (SNMP3 warning message about security level printed twice).
|
||||
(Jani)
|
||||
- Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction).
|
||||
(ben dot pineau at gmail dot com, Ilia, Matteo)
|
||||
- Fixed bug #49972 (AppendIterator undefined function crash). (Johannes)
|
||||
- Fixed bug #49921 (Curl post upload functions changed). (Ilia)
|
||||
- Fixed bug #49855 (import_request_variables() always returns NULL).
|
||||
(Ilia, sjoerd at php dot net)
|
||||
- Fixed bug #49847 (exec() fails to return data inside 2nd parameter, given
|
||||
output lines >4095 bytes). (Ilia)
|
||||
- Fixed bug #49809 (time_sleep_until() is not available on OpenSolaris). (Jani)
|
||||
- Fixed bug #49785 (insufficient input string validation of htmlspecialchars()).
|
||||
(Moriyoshi, hello at iwamot dot com)
|
||||
- Fixed bug #49757 (long2ip() can return wrong value in a multi-threaded
|
||||
applications). (Ilia, Florian Anderiasch)
|
||||
- Fixed bug #49738 (calling mcrypt() after mcrypt_generic_deinit() crashes).
|
||||
(Sriram Natarajan)
|
||||
- Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private
|
||||
property in base class). (Felipe)
|
||||
- Fixed bug #49698 (Unexpected change in strnatcasecmp()). (Rasmus)
|
||||
- Fixed bug #49677 (ini parser crashes with apache2 and using ${something} ini
|
||||
variables). (Jani)
|
||||
- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
|
||||
- Fixed bug #49647 (DOMUserData does not exist). (Rob)
|
||||
- Fixed bug #49630 (imap_listscan() function missing). (Felipe)
|
||||
- Fixed bug #49627 (error_log to specified file does not log time according to
|
||||
date.timezone). (Dmitry)
|
||||
- Fixed bug #49578 (make install-pear fails). (Hannes)
|
||||
- Fixed bug #49536 (mb_detect_encoding() returns incorrect results when
|
||||
mbstring.strict_mode is turned on). (Moriyoshi)
|
||||
- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE
|
||||
cannot be set"). (Felipe)
|
||||
- Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrongly converted).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #49521 (PDO fetchObject sets values before calling constructor).
|
||||
(Pierrick)
|
||||
- Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after
|
||||
fclose()). (Ilia)
|
||||
- Fixed bug #49472 (Constants defined in Interfaces can be overridden).
|
||||
(Felipe)
|
||||
- Fixed bug #49354 (mb_strcut() cuts wrong length when offset is in the middle
|
||||
of a multibyte character). (Moriyoshi)
|
||||
- Fixed bug #49332 (Build error with Snow Leopard). (Scott)
|
||||
- Fixed bug #49244 (Floating point NaN cause garbage characters). (Sjoerd)
|
||||
- Fixed bug #49174 (crash when extending PDOStatement and trying to set
|
||||
queryString property). (Felipe)
|
||||
- Fixed bug #49098 (mysqli segfault on error). (Rasmus)
|
||||
- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
|
||||
- Fixed bug #48764 (PDO_pgsql::query() always uses implicit prepared statements
|
||||
if v3 proto available). (Matteo, Mark Kirkwood)
|
||||
- Fixed bug #47848 (importNode doesn't preserve attribute namespaces). (Rob)
|
||||
- Fixed bug #45120 (PDOStatement->execute() returns true then false for same
|
||||
statement). (Pierrick)
|
||||
- Fixed bug #34852 (Failure in odbc_exec() using oracle-supplied odbc driver).
|
||||
(tim dot tassonis at trivadis dot com)
|
||||
|
||||
|
||||
17 Sep 2009, PHP 5.2.11
|
||||
- Fixed certificate validation inside php_openssl_apply_verification_policy.
|
||||
(Ryan Sleevi, Ilia)
|
||||
|
||||
|
||||
10 Sep 2009, PHP 5.2.11RC3
|
||||
- Updated timezone database to version 2009.13 (2009m) (Derick)
|
||||
|
||||
- Fixed bug #49470 (FILTER_SANITIZE_EMAIL allows disallowed characters). (Ilia)
|
||||
- Fixed bug #49447 (php engine needs to correctly check for socket API return
|
||||
status on windows). (Sriram Natarajan)
|
||||
- Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
|
||||
|
||||
|
||||
03 Sep 2009, PHP 5.2.11RC2
|
||||
- Added missing sanity checks around exif processing. (Ilia)
|
||||
|
||||
- Fixed sanity check for the color index in imagecolortransparent. (Pierre)
|
||||
- Fixed zlib.deflate compress filter to actually accept level parameter. (Jani)
|
||||
- Fixed leak on error in popen/exec (and related functions) on Windows.
|
||||
(Pierre)
|
||||
|
||||
- Fixed bug #49361 (wordwrap() wraps incorrectly on end of line boundaries).
|
||||
(Ilia, code-it at mail dot ru)
|
||||
- Fixed bug #49289 (bcmath module doesn't compile with phpize configure).
|
||||
(Jani)
|
||||
- Fixed bug #49286 (php://input (php_stream_input_read) is broken). (Jani)
|
||||
- Fixed bug #49269 (Ternary operator fails on Iterator object when used inside
|
||||
foreach declaration). (Etienne, Dmitry)
|
||||
- Fixed bug #49236 (Missing PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)). (Jani)
|
||||
- Fixed bug #49144 (Import of schema from different host transmits original
|
||||
authentication details). (Dmitry)
|
||||
- Fixed bug #49000 (PHP CLI in Interactive mode (php -a) crashes when including
|
||||
files from function). (Stas)
|
||||
- Fixed bug #48696 (ldap_read() segfaults with invalid parameters). (Felipe)
|
||||
- Fixed bug #47273 (Encoding bug in SoapServer->fault). (Dmitry)
|
||||
- Fixed bug #28038 (Sent incorrect RCPT TO commands to SMTP server) (Garrett)
|
||||
|
||||
|
||||
13 Aug 2009, PHP 5.2.11RC1
|
||||
- Fixed regression in cURL extension that prevented flush of data to output
|
||||
defined as a file handle. (Ilia)
|
||||
- Fixed memory leak in stream_is_local(). (Felipe, Tony)
|
||||
|
||||
- Fixed bug #49470 (FILTER_SANITIZE_EMAIL allows disallowed characters). (Ilia)
|
||||
- Fixed bug #49447 (php engine needs to correctly check for socket API return
|
||||
status on windows). (Sriram Natarajan)
|
||||
- Fixed bug #49372 (segfault in php_curl_option_curl). (Pierre)
|
||||
- Fixed bug #49361 (wordwrap() wraps incorrectly on end of line boundaries).
|
||||
(Ilia, code-it at mail dot ru)
|
||||
- Fixed bug #49289 (bcmath module doesn't compile with phpize configure).
|
||||
(Jani)
|
||||
- Fixed bug #49286 (php://input (php_stream_input_read) is broken). (Jani)
|
||||
- Fixed bug #49269 (Ternary operator fails on Iterator object when used
|
||||
inside foreach declaration). (Etienne, Dmitry)
|
||||
- Fixed bug #49236 (Missing PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)). (Jani)
|
||||
- Fixed bug #49144 (Import of schema from different host transmits original
|
||||
authentication details). (Dmitry)
|
||||
- Fixed bug #49132 (posix_times returns false without error).
|
||||
(phpbugs at gunnu dot us)
|
||||
- Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
|
||||
- Fixed bug #49095 (proc_get_status['exitcode'] fails on win32). (Felipe)
|
||||
- Fixed bug #49074 (private class static fields can be modified by using
|
||||
reflection). (Jani)
|
||||
- Fixed bug #49072 (feof never returns true for damaged file in zip). (Pierre)
|
||||
- Fixed bug #49072 (feof never returns true for damaged file in zip).
|
||||
(Pierre)
|
||||
- Fixed bug #49052 (context option headers freed too early when using
|
||||
--with-curlwrappers). (Jani)
|
||||
- Fixed bug #49032 (SplFileObject::fscanf() variables passed by reference).
|
||||
(Jani)
|
||||
- Fixed bug #49026 (proc_open() can bypass safe_mode_protected_env_vars
|
||||
restrictions). (Ilia)
|
||||
- Fixed bug #48994 (zlib.output_compression does not output HTTP headers when
|
||||
set to a string value). (Jani)
|
||||
- Fixed bug #49000 (PHP CLI in Interactive mode (php -a) crashes when
|
||||
including files from function). (Stas)
|
||||
- Fixed bug #48994 (zlib.output_compression does not output HTTP headers
|
||||
when set to a string value). (Jani)
|
||||
- Fixed bug #48980 (Crash when compiling with pdo_firebird). (Felipe)
|
||||
- Fixed bug #48962 (cURL does not upload files with specified filename).
|
||||
(Ilia)
|
||||
- Fixed bug #48962 (cURL does not upload files with specified filename). (Ilia)
|
||||
- Fixed bug #48929 (Double \r\n after HTTP headers when "header" context
|
||||
option is an array). (David Zülke)
|
||||
- Fixed bug #48913 (Too long error code strings in pdo_odbc driver).
|
||||
(naf at altlinux dot ru, Felipe)
|
||||
- Fixed bug #48802 (printf() returns incorrect outputted length). (Jani)
|
||||
- Fixed bug #48801 (Problem with imagettfbbox). (Takeshi Abe)
|
||||
- Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into symlinked
|
||||
directories). (Ilia)
|
||||
- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()).
|
||||
(Sriram Natarajan)
|
||||
- Fixed bug #48763 (ZipArchive produces corrupt archive). (dani dot church at
|
||||
gmail dot com, Pierre)
|
||||
- Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into
|
||||
symlinked directories). (Ilia)
|
||||
- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()). (Sriram Natarajan)
|
||||
- Fixed bug #48763 (ZipArchive produces corrupt archive).
|
||||
(dani dot church at gmail dot com, Pierre)
|
||||
- Fixed bug #48762 (IPv6 address filter still rejects valid address). (Felipe)
|
||||
- Fixed bug #48733 (CURLOPT_WRITEHEADER|CURLOPT_FILE|CURLOPT_STDERR warns on
|
||||
files that have been opened with r+). (Ilia)
|
||||
@@ -85,6 +189,7 @@ PHP NEWS
|
||||
- Fixed bug #48709 (metaphone and 'wh'). (brettz9 at yahoo dot com, Felipe)
|
||||
- Fixed bug #48697 (mb_internal_encoding() value gets reset by parse_str()).
|
||||
(Moriyoshi)
|
||||
- Fixed bug #48696 (ldap_read() segfaults with invalid parameters). (Felipe)
|
||||
- Fixed bug #48693 (Double declaration of __lambda_func when lambda wrongly
|
||||
formatted). (peter at lvp-media dot com, Felipe)
|
||||
- Fixed bug #48661 (phpize is broken with non-bash shells). (Jani)
|
||||
@@ -92,54 +197,57 @@ PHP NEWS
|
||||
html-entities). (Moriyoshi)
|
||||
- Fixed bug #48637 ("file" fopen wrapper is overwritten when using
|
||||
--with-curlwrappers). (Jani)
|
||||
- Fixed bug #48636 (Error compiling of ext/date on netware). (guenter at
|
||||
php.net, Ilia)
|
||||
- Fixed bug #48636 (Error compiling of ext/date on netware).
|
||||
(guenter at php.net, Ilia)
|
||||
- Fixed bug #48629 (get_defined_constants() ignores categorize parameter).
|
||||
(Felipe)
|
||||
- Fixed bug #48619 (imap_search ALL segfaults). (Pierre)
|
||||
- Fixed bug #48608 (Invalid libreadline version not detected during configure).
|
||||
(Jani)
|
||||
- Fixed bug #48555 (ImageFTBBox() differs from previous versions for texts
|
||||
with new lines) (Takeshi Abe)
|
||||
- Fixed bug #48608 (Invalid libreadline version not detected during
|
||||
configure). (Jani)
|
||||
- Fixed bug #48555 (ImageFTBBox() differs from previous versions for texts with
|
||||
new lines) (Takeshi Abe)
|
||||
- Fixed bug #48539 (pdo_dblib fails to connect, throws empty PDOException
|
||||
"SQLSTATE[] (null)"). (Felipe)
|
||||
- Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
|
||||
TMPDIR). (Ilia)
|
||||
- Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using TMPDIR).
|
||||
(Ilia)
|
||||
- Fixed bug #48450 (Compile failure under IRIX 6.5.30 building gd.c). (Kalle)
|
||||
- Fixed bug #48400 (imap crashes when closing stream opened with
|
||||
OP_PROTOTYPE flag). (Jani)
|
||||
- Fixed bug #48400 (imap crashes when closing stream opened with OP_PROTOTYPE
|
||||
flag). (Jani)
|
||||
- Fixed bug #48284 (hash "adler32" byte order is reversed). (Scott)
|
||||
- Fixed bug #48276 (date("Y") on big endian machines produces the
|
||||
wrong result). (Scott)
|
||||
- Fixed bug #48276 (date("Y") on big endian machines produces the wrong
|
||||
result). (Scott)
|
||||
- Fixed bug #48247 (Infinite loop and possible crash during startup with
|
||||
errors when errors are logged). (Jani)
|
||||
- Fixed bug #48116 (Fixed build with Openssl 1.0). (Pierre,
|
||||
Al dot Smith at aeschi dot ch dot eu dot org)
|
||||
- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
|
||||
(Sriram Natarajan)
|
||||
- Fixed bug #48116 (Fixed build with Openssl 1.0).
|
||||
(Pierre, Al dot Smith at aeschi dot ch dot eu dot org)
|
||||
- Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
|
||||
- Fixed bug #48057 (Only the date fields of the first row are fetched,
|
||||
others are empty). (info at programmiernutte dot net)
|
||||
- Fixed bug #47481 (natcasesort() does not sort extended ASCII characters
|
||||
correctly). (Herman Radtke)
|
||||
- Fixed bug #47351 (Memory leak in DateTime). (Derick, Tobias John)
|
||||
- Fixed bug #47273 (Encoding bug in SoapServer->fault). (Dmitry)
|
||||
- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
|
||||
(Uwe Schindler)
|
||||
- Fixed bug #45905 (imagefilledrectangle() clipping error).
|
||||
(markril at hotmail dot com, Pierre)
|
||||
- Fixed bug #45280 (Reflection of instantiated COM classes causes PHP to crash)
|
||||
(Paul Richards, Kalle)
|
||||
- Fixed bug #45280 (Reflection of instantiated COM classes causes PHP to
|
||||
crash). (Paul Richards, Kalle)
|
||||
- Fixed bug #45141 (setcookie will output expires years of >4 digits). (Ilia)
|
||||
- Fixed bug #44683 (popen crashes when an invalid mode is passed). (Pierre)
|
||||
- Fixed bug #44144 (spl_autoload_functions() should return object instance
|
||||
when appropriate). (Hannes, Etienne)
|
||||
- Fixed bug #43510 (stream_get_meta_data() does not return same mode as used
|
||||
in fopen). (Jani)
|
||||
- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter). (wojjie at gmail dot
|
||||
com, Kalle)
|
||||
- Fixed bug #43510 (stream_get_meta_data() does not return same mode as used in
|
||||
fopen). (Jani)
|
||||
- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter).
|
||||
(wojjie at gmail dot com, Kalle)
|
||||
- Fixed bug #28038 (Sent incorrect RCPT TO commands to SMTP server) (Garrett)
|
||||
- Fixed bug #49572 (use of C++ style comments causes build failure).
|
||||
(Sriram Natarajan)
|
||||
|
||||
17 Jun 2009, PHP 5.2.10
|
||||
- Updated timezone database to version 2009.9 (2009i) (Derick)
|
||||
|
||||
- Added "ignore_errors" option to http fopen wrapper. (David Zulke, Sara)
|
||||
- Added new CURL options CURLOPT_REDIR_PROTOCOLS, CURLOPT_PROTOCOLS,
|
||||
and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas)
|
||||
|
||||
@@ -8,6 +8,4 @@ $foo[3]->bar[1] = "bang";
|
||||
echo "ok\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: Uninitialized string offset: 3 in %s on line %d
|
||||
|
||||
Fatal error: Cannot use string offset as an object in %sbug41919.php on line %d
|
||||
@@ -0,0 +1,27 @@
|
||||
--TEST--
|
||||
Bug #49472 (Constants defined in Interfaces can be overridden)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
interface ia {
|
||||
const c = 'Sea';
|
||||
const y = 2;
|
||||
}
|
||||
|
||||
class Foo implements ia {
|
||||
}
|
||||
|
||||
class FooBar extends Foo implements ia {
|
||||
const x = 1;
|
||||
const c = 'Ocean';
|
||||
|
||||
public function show() {
|
||||
return ia::c;
|
||||
}
|
||||
}
|
||||
|
||||
new FooBar;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot inherit previously-inherited or override constant c from interface ia in %s on line %d
|
||||
@@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #50005 (Throwing through Reflection modified Exception object makes segmentation fault)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class a extends exception {
|
||||
public function __construct() {
|
||||
$this->file = null;
|
||||
}
|
||||
}
|
||||
|
||||
throw new a;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'a' in :%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in Unknown on line %d
|
||||
@@ -0,0 +1,33 @@
|
||||
--TEST--
|
||||
Bug #50174 (Incorrectly matched docComment)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class TestClass
|
||||
{
|
||||
/** const comment */
|
||||
const C = 0;
|
||||
|
||||
function x() {}
|
||||
}
|
||||
|
||||
$rm = new ReflectionMethod('TestClass', 'x');
|
||||
var_dump($rm->getDocComment());
|
||||
|
||||
class TestClass2
|
||||
{
|
||||
/** const comment */
|
||||
const C = 0;
|
||||
|
||||
public $x;
|
||||
}
|
||||
|
||||
$rp = new ReflectionProperty('TestClass2', 'x');
|
||||
var_dump($rp->getDocComment());
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
bool(false)
|
||||
@@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Bug #50255 (isset() and empty() silently casts array to object)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$arr = array('foo' => 'bar');
|
||||
|
||||
print "isset\n";
|
||||
var_dump(isset($arr->foo));
|
||||
var_dump(isset($arr->bar));
|
||||
var_dump(isset($arr['foo']));
|
||||
var_dump(isset($arr['bar']));
|
||||
print "empty\n";
|
||||
var_dump(empty($arr->foo));
|
||||
var_dump(empty($arr->bar));
|
||||
var_dump(empty($arr['foo']));
|
||||
var_dump(empty($arr['bar']));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
isset
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
empty
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
@@ -16,5 +16,5 @@ class test implements test1, test2 {
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot inherit previously-inherited constant FOO from interface test2 in %s on line %d
|
||||
--EXPECTF--
|
||||
Fatal error: Cannot inherit previously-inherited or override constant FOO from interface test2 in %s on line %d
|
||||
+21
-4
@@ -2333,20 +2333,28 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zval **parent_constant, zend_hash_key *hash_key, zend_class_entry *iface)
|
||||
{
|
||||
zval **old_constant;
|
||||
|
||||
if (zend_hash_quick_find(child_constants_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void**)&old_constant) == SUCCESS) {
|
||||
if (*old_constant != *parent_constant) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot inherit previously-inherited constant %s from interface %s", hash_key->arKey, iface->name);
|
||||
if (*old_constant != *parent_constant) {
|
||||
zend_error(E_COMPILE_ERROR, "Cannot inherit previously-inherited or override constant %s from interface %s", hash_key->arKey, iface->name);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int do_interface_constant_check(zval **val, int num_args, va_list args, zend_hash_key *key) /* {{{ */
|
||||
{
|
||||
zend_class_entry **iface = va_arg(args, zend_class_entry**);
|
||||
|
||||
do_inherit_constant_check(&(*iface)->constants_table, val, key, *iface);
|
||||
|
||||
return ZEND_HASH_APPLY_KEEP;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface TSRMLS_DC)
|
||||
{
|
||||
@@ -2366,7 +2374,10 @@ ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!ignore) {
|
||||
if (ignore) {
|
||||
/* Check for attempt to redeclare interface constants */
|
||||
zend_hash_apply_with_arguments(&ce->constants_table, (apply_func_args_t) do_interface_constant_check, 1, &iface);
|
||||
} else {
|
||||
if (ce->num_interfaces >= current_iface_num) {
|
||||
if (ce->type == ZEND_INTERNAL_CLASS) {
|
||||
ce->interfaces = (zend_class_entry **) realloc(ce->interfaces, sizeof(zend_class_entry *) * (++current_iface_num));
|
||||
@@ -3103,6 +3114,12 @@ void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC)
|
||||
zend_error(E_COMPILE_ERROR, "Cannot redefine class constant %s::%s", CG(active_class_entry)->name, var_name->u.constant.value.str.val);
|
||||
}
|
||||
FREE_PNODE(var_name);
|
||||
|
||||
if (CG(doc_comment)) {
|
||||
efree(CG(doc_comment));
|
||||
CG(doc_comment) = NULL;
|
||||
CG(doc_comment_len) = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -1132,7 +1132,8 @@ static void zend_fetch_dimension_address(temp_variable *result, zval **container
|
||||
break;
|
||||
}
|
||||
if (result) {
|
||||
if (Z_LVAL_P(dim) < 0 || Z_STRLEN_P(container) <= Z_LVAL_P(dim)) {
|
||||
if ((Z_LVAL_P(dim) < 0 || Z_STRLEN_P(container) <= Z_LVAL_P(dim)) &&
|
||||
(type == BP_VAR_R || type == BP_VAR_IS)) {
|
||||
zend_error(E_NOTICE, "Uninitialized string offset: %ld", Z_LVAL_P(dim));
|
||||
}
|
||||
container = *container_ptr;
|
||||
|
||||
@@ -1511,7 +1511,7 @@ void zend_unset_timeout(TSRMLS_D)
|
||||
}
|
||||
#else
|
||||
# ifdef HAVE_SETITIMER
|
||||
{
|
||||
if (EG(timeout_seconds)) {
|
||||
struct itimerval no_timeout;
|
||||
|
||||
no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0;
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
|
||||
|
||||
ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC)
|
||||
{
|
||||
zend_function *destructor = object->ce->destructor;
|
||||
zend_function *destructor = object ? object->ce->destructor : NULL;
|
||||
|
||||
if (destructor) {
|
||||
zval *obj;
|
||||
|
||||
@@ -1202,6 +1202,12 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
|
||||
}
|
||||
if (result==op1) { /* special case, perform operations on result */
|
||||
uint res_len = op1->value.str.len + op2->value.str.len;
|
||||
|
||||
if (Z_STRLEN_P(result) < 0 || (int) (Z_STRLEN_P(op1) + Z_STRLEN_P(op2)) < 0) {
|
||||
efree(Z_STRVAL_P(result));
|
||||
ZVAL_EMPTY_STRING(result);
|
||||
zend_error(E_ERROR, "String size overflow");
|
||||
}
|
||||
|
||||
result->value.str.val = erealloc(result->value.str.val, res_len+1);
|
||||
|
||||
|
||||
+2
-1
@@ -939,6 +939,7 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, ANY, int type
|
||||
|
||||
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
|
||||
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
|
||||
FREE_OP1();
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
|
||||
/*
|
||||
@@ -3531,7 +3532,7 @@ ZEND_VM_HELPER_EX(zend_isset_isempty_dim_prop_obj_handler, VAR|UNUSED|CV, CONST|
|
||||
zend_free_op free_op2;
|
||||
zval *offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
|
||||
+16
-12
@@ -1531,6 +1531,7 @@ static int zend_fetch_var_address_helper_SPEC_CONST(int type, ZEND_OPCODE_HANDLE
|
||||
|
||||
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
|
||||
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
|
||||
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
|
||||
/*
|
||||
@@ -4111,6 +4112,7 @@ static int zend_fetch_var_address_helper_SPEC_TMP(int type, ZEND_OPCODE_HANDLER_
|
||||
|
||||
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
|
||||
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
|
||||
zval_dtor(free_op1.var);
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
|
||||
/*
|
||||
@@ -7166,6 +7168,7 @@ static int zend_fetch_var_address_helper_SPEC_VAR(int type, ZEND_OPCODE_HANDLER_
|
||||
|
||||
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
|
||||
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
|
||||
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
|
||||
/*
|
||||
@@ -9747,7 +9750,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CONST(int prop_dim,
|
||||
|
||||
zval *offset = &opline->op2.u.constant;
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -11280,7 +11283,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_TMP(int prop_dim, ZE
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -12861,7 +12864,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_VAR(int prop_dim, ZE
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -14887,7 +14890,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CV(int prop_dim, ZEN
|
||||
|
||||
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -16006,7 +16009,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CONST(int prop_di
|
||||
|
||||
zval *offset = &opline->op2.u.constant;
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -16999,7 +17002,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_TMP(int prop_dim,
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -17992,7 +17995,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_VAR(int prop_dim,
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -19253,7 +19256,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CV(int prop_dim,
|
||||
|
||||
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -19600,6 +19603,7 @@ static int zend_fetch_var_address_helper_SPEC_CV(int type, ZEND_OPCODE_HANDLER_A
|
||||
|
||||
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
|
||||
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
|
||||
|
||||
} else {
|
||||
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
|
||||
/*
|
||||
@@ -22014,7 +22018,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CONST(int prop_dim, Z
|
||||
|
||||
zval *offset = &opline->op2.u.constant;
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -23539,7 +23543,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_TMP(int prop_dim, ZEN
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -25111,7 +25115,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_VAR(int prop_dim, ZEN
|
||||
zend_free_op free_op2;
|
||||
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
@@ -27127,7 +27131,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CV(int prop_dim, ZEND
|
||||
|
||||
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
|
||||
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY) {
|
||||
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
|
||||
HashTable *ht;
|
||||
int isset = 0;
|
||||
|
||||
|
||||
+6
-6
@@ -1688,7 +1688,7 @@ dnl PHP_BROKEN_GLIBC_FOPEN_APPEND
|
||||
dnl
|
||||
AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [
|
||||
AC_MSG_CHECKING([for broken libc stdio])
|
||||
AC_CACHE_VAL(have_broken_glibc_fopen_append,[
|
||||
AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[
|
||||
AC_TRY_RUN([
|
||||
#include <stdio.h>
|
||||
int main(int argc, char *argv[])
|
||||
@@ -1714,8 +1714,8 @@ int main(int argc, char *argv[])
|
||||
return 0;
|
||||
}
|
||||
],
|
||||
[have_broken_glibc_fopen_append=no],
|
||||
[have_broken_glibc_fopen_append=yes ],
|
||||
[_cv_have_broken_glibc_fopen_append=no],
|
||||
[_cv_have_broken_glibc_fopen_append=yes ],
|
||||
AC_TRY_COMPILE([
|
||||
#include <features.h>
|
||||
],[
|
||||
@@ -1723,11 +1723,11 @@ AC_TRY_COMPILE([
|
||||
choke me
|
||||
#endif
|
||||
],
|
||||
[have_broken_glibc_fopen_append=yes],
|
||||
[have_broken_glibc_fopen_append=no ])
|
||||
[_cv_have_broken_glibc_fopen_append=yes],
|
||||
[_cv_have_broken_glibc_fopen_append=no ])
|
||||
)])
|
||||
|
||||
if test "$have_broken_glibc_fopen_append" = "yes"; then
|
||||
if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
|
||||
else
|
||||
|
||||
Vendored
+899
-793
File diff suppressed because it is too large.
Load diff
Vendored
+80
-20
@@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2005-08-03'
|
||||
timestamp='2008-01-23'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@@ -55,8 +56,8 @@ version="\
|
||||
GNU config.guess ($timestamp)
|
||||
|
||||
Originally written by Per Bothner.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -106,7 +107,7 @@ set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
@@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
sh5el) machine=sh5le-unknown ;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
@@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:ekkoBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:SolidBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
macppc:MirBSD:*:*)
|
||||
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
|
||||
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:MirBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
|
||||
@@ -325,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
|
||||
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
i86pc:SunOS:5.*:*)
|
||||
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
|
||||
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit ;;
|
||||
sun4*:SunOS:6*:*)
|
||||
@@ -527,7 +532,7 @@ EOF
|
||||
echo rs6000-ibm-aix3.2
|
||||
fi
|
||||
exit ;;
|
||||
*:AIX:*:[45])
|
||||
*:AIX:*:[456])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
@@ -764,12 +769,19 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
case ${UNAME_MACHINE} in
|
||||
pc98)
|
||||
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
amd64)
|
||||
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
|
||||
esac
|
||||
exit ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
exit ;;
|
||||
i*:MINGW*:*)
|
||||
*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit ;;
|
||||
i*:windows32*:*)
|
||||
@@ -779,9 +791,18 @@ EOF
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit ;;
|
||||
x86:Interix*:[34]*)
|
||||
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
||||
exit ;;
|
||||
*:Interix*:[3456]*)
|
||||
case ${UNAME_MACHINE} in
|
||||
x86)
|
||||
echo i586-pc-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
EM64T | authenticamd)
|
||||
echo x86_64-unknown-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
IA64)
|
||||
echo ia64-unknown-interix${UNAME_RELEASE}
|
||||
exit ;;
|
||||
esac ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
exit ;;
|
||||
@@ -815,6 +836,16 @@ EOF
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit ;;
|
||||
arm*:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep -q __ARM_EABI__
|
||||
then
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
else
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
|
||||
fi
|
||||
exit ;;
|
||||
avr32*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
cris:Linux:*:*)
|
||||
@@ -851,7 +882,11 @@ EOF
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^CPU/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
mips64:Linux:*:*)
|
||||
@@ -870,7 +905,11 @@ EOF
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^CPU/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
|
||||
;;
|
||||
or32:Linux:*:*)
|
||||
@@ -919,9 +958,15 @@ EOF
|
||||
sparc:Linux:*:* | sparc64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
vax:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-dec-linux-gnu
|
||||
exit ;;
|
||||
x86_64:Linux:*:*)
|
||||
echo x86_64-unknown-linux-gnu
|
||||
exit ;;
|
||||
xtensa*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-linux-gnu
|
||||
exit ;;
|
||||
i*86:Linux:*:*)
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
@@ -964,7 +1009,7 @@ EOF
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#ifdef __INTEL_COMPILER
|
||||
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
@@ -974,7 +1019,11 @@ EOF
|
||||
LIBC=dietlibc
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
|
||||
/^LIBC/{
|
||||
s: ::g
|
||||
p
|
||||
}'`"
|
||||
test x"${LIBC}" != x && {
|
||||
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
|
||||
exit
|
||||
@@ -1176,6 +1225,15 @@ EOF
|
||||
SX-6:SUPER-UX:*:*)
|
||||
echo sx6-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-7:SUPER-UX:*:*)
|
||||
echo sx7-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-8:SUPER-UX:*:*)
|
||||
echo sx8-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
SX-8R:SUPER-UX:*:*)
|
||||
echo sx8r-nec-superux${UNAME_RELEASE}
|
||||
exit ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit ;;
|
||||
@@ -1185,7 +1243,6 @@ EOF
|
||||
*:Darwin:*:*)
|
||||
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
|
||||
case $UNAME_PROCESSOR in
|
||||
*86) UNAME_PROCESSOR=i686 ;;
|
||||
unknown) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
@@ -1264,6 +1321,9 @@ EOF
|
||||
i*86:skyos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
|
||||
exit ;;
|
||||
i*86:rdos:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-rdos
|
||||
exit ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
@@ -1424,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
|
||||
the operating system you are using. It is advised that you
|
||||
download the most up to date version of the config scripts from
|
||||
|
||||
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
|
||||
and
|
||||
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
|
||||
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
|
||||
|
||||
If the version you run ($0) is already up to date, please
|
||||
send the following data and any information you think might be
|
||||
|
||||
Vendored
+116
-37
@@ -1,9 +1,10 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2005-07-08'
|
||||
timestamp='2008-01-16'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@@ -71,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
|
||||
version="\
|
||||
GNU config.sub ($timestamp)
|
||||
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
|
||||
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||
@@ -119,8 +120,9 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
|
||||
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
|
||||
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
|
||||
storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@@ -171,6 +173,10 @@ case $os in
|
||||
-hiux*)
|
||||
os=-hiuxwe2
|
||||
;;
|
||||
-sco6)
|
||||
os=-sco5v6
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5)
|
||||
os=-sco3.2v5
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
@@ -187,6 +193,10 @@ case $os in
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco5v6*)
|
||||
# Don't forget version if it is 3.2v4 or newer.
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
;;
|
||||
-sco*)
|
||||
os=-sco3.2v2
|
||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||
@@ -231,15 +241,16 @@ case $basic_machine in
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| am33_2.0 \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
|
||||
| bfin \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| fido | fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k | iq2000 \
|
||||
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
|
||||
| m32c | m32r | m32rle | m68000 | m68k | m88k \
|
||||
| maxq | mb | microblaze | mcore | mep \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
@@ -257,28 +268,27 @@ case $basic_machine in
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| ms1 \
|
||||
| mt \
|
||||
| msp430 \
|
||||
| nios | nios2 \
|
||||
| ns16k | ns32k \
|
||||
| or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| score \
|
||||
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
|
||||
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
|
||||
| spu | strongarm \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m32c)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
@@ -286,6 +296,9 @@ case $basic_machine in
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
|
||||
;;
|
||||
ms1)
|
||||
basic_machine=mt-unknown
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
@@ -305,18 +318,18 @@ case $basic_machine in
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| avr-* | avr32-* \
|
||||
| bfin-* | bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | craynv-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* | iq2000-* \
|
||||
| m32r-* | m32rle-* \
|
||||
| m32c-* | m32r-* | m32rle-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | maxq-* | mcore-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
@@ -336,30 +349,33 @@ case $basic_machine in
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| mmix-* \
|
||||
| ms1-* \
|
||||
| mt-* \
|
||||
| msp430-* \
|
||||
| nios-* | nios2-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
|
||||
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
|
||||
| sparclite-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa-* \
|
||||
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
|
||||
| xstormy16-* | xtensa*-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
m32c-*)
|
||||
# Recognize the basic CPU types without company name, with glob match.
|
||||
xtensa*)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@@ -431,6 +447,14 @@ case $basic_machine in
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
blackfin)
|
||||
basic_machine=bfin-unknown
|
||||
os=-linux
|
||||
;;
|
||||
blackfin-*)
|
||||
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
@@ -463,8 +487,8 @@ case $basic_machine in
|
||||
basic_machine=craynv-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
cr16c)
|
||||
basic_machine=cr16c-unknown
|
||||
cr16)
|
||||
basic_machine=cr16-unknown
|
||||
os=-elf
|
||||
;;
|
||||
crds | unos)
|
||||
@@ -656,6 +680,14 @@ case $basic_machine in
|
||||
basic_machine=m68k-isi
|
||||
os=-sysv
|
||||
;;
|
||||
m68knommu)
|
||||
basic_machine=m68k-unknown
|
||||
os=-linux
|
||||
;;
|
||||
m68knommu-*)
|
||||
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
m88k-omron*)
|
||||
basic_machine=m88k-omron
|
||||
;;
|
||||
@@ -671,6 +703,10 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-mingw32
|
||||
;;
|
||||
mingw32ce)
|
||||
basic_machine=arm-unknown
|
||||
os=-mingw32ce
|
||||
;;
|
||||
miniframe)
|
||||
basic_machine=m68000-convergent
|
||||
;;
|
||||
@@ -696,6 +732,9 @@ case $basic_machine in
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
;;
|
||||
ms1-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||
;;
|
||||
mvs)
|
||||
basic_machine=i370-ibm
|
||||
os=-mvs
|
||||
@@ -794,6 +833,14 @@ case $basic_machine in
|
||||
basic_machine=i860-intel
|
||||
os=-osf
|
||||
;;
|
||||
parisc)
|
||||
basic_machine=hppa-unknown
|
||||
os=-linux
|
||||
;;
|
||||
parisc-*)
|
||||
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
os=-linux
|
||||
;;
|
||||
pbd)
|
||||
basic_machine=sparc-tti
|
||||
;;
|
||||
@@ -803,6 +850,12 @@ case $basic_machine in
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pc98)
|
||||
basic_machine=i386-pc
|
||||
;;
|
||||
pc98-*)
|
||||
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
@@ -859,6 +912,10 @@ case $basic_machine in
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
rdos)
|
||||
basic_machine=i386-pc
|
||||
os=-rdos
|
||||
;;
|
||||
rom68k)
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
@@ -885,6 +942,10 @@ case $basic_machine in
|
||||
sb1el)
|
||||
basic_machine=mipsisa64sb1el-unknown
|
||||
;;
|
||||
sde)
|
||||
basic_machine=mipsisa32-sde
|
||||
os=-elf
|
||||
;;
|
||||
sei)
|
||||
basic_machine=mips-sei
|
||||
os=-seiux
|
||||
@@ -896,6 +957,9 @@ case $basic_machine in
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sh5el)
|
||||
basic_machine=sh5le-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
@@ -985,6 +1049,10 @@ case $basic_machine in
|
||||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tile*)
|
||||
basic_machine=tile-unknown
|
||||
os=-linux-gnu
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
@@ -1101,7 +1169,7 @@ case $basic_machine in
|
||||
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b)
|
||||
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
@@ -1174,21 +1242,23 @@ case $os in
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
|
||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
|
||||
| -skyos* | -haiku*)
|
||||
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@@ -1340,6 +1410,12 @@ else
|
||||
# system, and we'll never get to this point.
|
||||
|
||||
case $basic_machine in
|
||||
score-*)
|
||||
os=-elf
|
||||
;;
|
||||
spu-*)
|
||||
os=-elf
|
||||
;;
|
||||
*-acorn)
|
||||
os=-riscix1.2
|
||||
;;
|
||||
@@ -1349,9 +1425,9 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
@@ -1377,6 +1453,9 @@ case $basic_machine in
|
||||
m68*-cisco)
|
||||
os=-aout
|
||||
;;
|
||||
mep-*)
|
||||
os=-elf
|
||||
;;
|
||||
mips*-cisco)
|
||||
os=-elf
|
||||
;;
|
||||
|
||||
+39
-39
@@ -41,7 +41,7 @@ AC_CONFIG_HEADER(main/php_config.h)
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=2
|
||||
PHP_RELEASE_VERSION=11
|
||||
PHP_RELEASE_VERSION=12
|
||||
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`
|
||||
@@ -122,21 +122,6 @@ dnl or the contents of libs.
|
||||
$php_shtool mkdir -p libs
|
||||
rm -f libs/*
|
||||
|
||||
dnl Darwin 9 hack
|
||||
dnl Because the default debugging format used by Apple's GCC on Mac OS 10.5
|
||||
dnl causes errors in all current and past versions of Autoconf, we do a little
|
||||
dnl messing with the CFLAGS here to trick it.
|
||||
php_did_darwin9_cheat=0
|
||||
case $host_alias in
|
||||
*darwin9*)
|
||||
hasg=`echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)'`
|
||||
if test x"$hasg" = "x"; then
|
||||
php_did_darwin9_cheat=1
|
||||
CFLAGS="$CFLAGS -gstabs"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Checks for programs.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
@@ -192,6 +177,7 @@ case $host_cpu in
|
||||
if test "$SUNCC" = "yes"; then
|
||||
CFLAGS="$CFLAGS -xmemalign=8s"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case $host_alias in
|
||||
@@ -211,7 +197,14 @@ case $host_alias in
|
||||
CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
|
||||
|
||||
macosx_major=`sw_vers -productVersion | cut -d . -f 1`
|
||||
macosx_minor=`sw_vers -productVersion | cut -d . -f 2`
|
||||
|
||||
if test "$macosx_major" -ge "10" && test "$macosx_minor" -lt "6" ; then
|
||||
AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
|
||||
fi
|
||||
|
||||
php_multiple_shlib_versions_ok=yes
|
||||
;;
|
||||
*beos*)
|
||||
@@ -366,7 +359,6 @@ dnl in -lc, -lbind and -lresolv
|
||||
PHP_CHECK_FUNC(inet_aton, resolv, bind)
|
||||
PHP_CHECK_FUNC(dn_skipname, resolv, bind)
|
||||
|
||||
|
||||
dnl Then headers.
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
@@ -386,6 +378,7 @@ sys/time.h \
|
||||
netinet/in.h \
|
||||
alloca.h \
|
||||
arpa/inet.h \
|
||||
arpa/nameser_compat.h \
|
||||
arpa/nameser.h \
|
||||
assert.h \
|
||||
crypt.h \
|
||||
@@ -594,11 +587,13 @@ tzset \
|
||||
unlockpt \
|
||||
unsetenv \
|
||||
usleep \
|
||||
nanosleep \
|
||||
utime \
|
||||
vsnprintf \
|
||||
)
|
||||
|
||||
dnl Some systems (like OpenSolaris) do not have nanosleep in libc
|
||||
AC_CACHE_CHECK([for nanosleep], ac_cv_func_nanosleep, [PHP_CHECK_FUNC_LIB(nanosleep, rt)])
|
||||
|
||||
dnl Check for getaddrinfo, should be a better way, but...
|
||||
dnl Also check for working getaddrinfo
|
||||
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
|
||||
@@ -736,15 +731,6 @@ if test "$PHP_GCOV" = "yes"; then
|
||||
dnl Add the special gcc flags
|
||||
CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
|
||||
CXXFLAGS="$CXXFLAGS -O0 -fprofile-arcs -ftest-coverage"
|
||||
if test "$SUNCC" = "yes"; then
|
||||
if test -n "$auto_cflags"; then
|
||||
CFLAGS="-g"
|
||||
CXXFLAGS="-g"
|
||||
else
|
||||
CFLAGS="$CFLAGS -g"
|
||||
CXXFLAGS="$CFLAGS -g"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
PHP_ARG_ENABLE(debug, whether to include debugging symbols,
|
||||
@@ -759,8 +745,17 @@ if test "$PHP_DEBUG" = "yes"; then
|
||||
changequote([,])
|
||||
dnl add -O0 only if GCC or ICC is used
|
||||
if test "$GCC" = "yes" || test "$ICC" = "yes"; then
|
||||
CFLAGS="$CFLAGS -O0"
|
||||
CXXFLAGS="$CXXFLAGS -O0"
|
||||
CFLAGS="$CFLAGS -g -O0"
|
||||
CXXFLAGS="$CXXFLAGS -g -O0"
|
||||
fi
|
||||
if test "$SUNCC" = "yes"; then
|
||||
if test -n "$auto_cflags"; then
|
||||
CFLAGS="-g"
|
||||
CXXFLAGS="-g"
|
||||
else
|
||||
CFLAGS="$CFLAGS -g"
|
||||
CXXFLAGS="$CFLAGS -g"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
PHP_DEBUG=0
|
||||
@@ -965,6 +960,7 @@ case $php_build_target in
|
||||
esac
|
||||
|
||||
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
|
||||
|
||||
dnl this has to be here to prevent the openssl crypt() from
|
||||
dnl overriding the system provided crypt().
|
||||
@@ -1145,6 +1141,7 @@ EXPANDED_PEAR_INSTALLDIR=`eval echo $PEAR_INSTALLDIR`
|
||||
EXPANDED_EXTENSION_DIR=`eval echo $EXTENSION_DIR`
|
||||
EXPANDED_LOCALSTATEDIR=`eval echo $localstatedir`
|
||||
EXPANDED_BINDIR=`eval echo $bindir`
|
||||
EXPANDED_SBINDIR=`eval echo $sbindir`
|
||||
EXPANDED_LIBDIR=$libdir
|
||||
EXPANDED_SYSCONFDIR=`eval echo $sysconfdir`
|
||||
EXPANDED_DATADIR=$datadir
|
||||
@@ -1160,6 +1157,7 @@ AC_SUBST(INCLUDE_PATH)
|
||||
AC_SUBST(EXPANDED_PEAR_INSTALLDIR)
|
||||
AC_SUBST(EXPANDED_EXTENSION_DIR)
|
||||
AC_SUBST(EXPANDED_BINDIR)
|
||||
AC_SUBST(EXPANDED_SBINDIR)
|
||||
AC_SUBST(EXPANDED_LIBDIR)
|
||||
AC_SUBST(EXPANDED_DATADIR)
|
||||
AC_SUBST(EXPANDED_SYSCONFDIR)
|
||||
@@ -1204,12 +1202,14 @@ if test "$PHP_CLI" != "no"; then
|
||||
PHP_INSTALL_CLI_TARGET="install-cli"
|
||||
PHP_ADD_SOURCES(sapi/cli, php_cli.c php_cli_readline.c getopt.c,, cli)
|
||||
PHP_INSTALLED_SAPIS="cli $PHP_SAPI"
|
||||
PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"
|
||||
else
|
||||
PHP_INSTALLED_SAPIS="$PHP_SAPI"
|
||||
fi
|
||||
|
||||
PHP_SUBST_OLD(PHP_INSTALLED_SAPIS)
|
||||
|
||||
PHP_SUBST(PHP_EXECUTABLE)
|
||||
PHP_SUBST(PHP_CLI_TARGET)
|
||||
PHP_SUBST(PHP_SAPI_OBJS)
|
||||
PHP_SUBST(PHP_CLI_OBJS)
|
||||
@@ -1226,6 +1226,7 @@ PHP_SUBST_OLD(php_abs_top_builddir)
|
||||
PHP_SUBST_OLD(php_abs_top_srcdir)
|
||||
|
||||
PHP_SUBST(bindir)
|
||||
PHP_SUBST(sbindir)
|
||||
PHP_SUBST(exec_prefix)
|
||||
PHP_SUBST_OLD(program_prefix)
|
||||
PHP_SUBST_OLD(program_suffix)
|
||||
@@ -1318,6 +1319,14 @@ PHP_CONFIGURE_PART(Configuring libtool)
|
||||
|
||||
LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
|
||||
|
||||
dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
|
||||
dnl This hack works around it. Ugly.
|
||||
case $host_alias in
|
||||
*darwin9*|*darwin10*)
|
||||
ac_cv_exeext=
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
|
||||
dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
|
||||
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
|
||||
@@ -1341,15 +1350,6 @@ SHARED_LIBTOOL='$(LIBTOOL)'
|
||||
|
||||
CC=$old_CC
|
||||
|
||||
dnl Finish the Darwin hack
|
||||
if test "$php_did_darwin9_cheat" -eq 1; then
|
||||
if test "$PHP_DEBUG" = "1"; then
|
||||
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-gstabs/-g/g'`
|
||||
else
|
||||
CFLAGS=`echo "-O2 $CFLAGS" | $SED -e 's/-gstabs//g'`
|
||||
fi
|
||||
fi
|
||||
|
||||
PHP_CONFIGURE_PART(Generating files)
|
||||
|
||||
CXXFLAGS_CLEAN=$CXXFLAGS
|
||||
|
||||
@@ -309,7 +309,7 @@ ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj
|
||||
}
|
||||
} else if (typelibname) {
|
||||
/* Fetch the typelibrary and use that to look things up */
|
||||
typelib = php_com_load_typelib(typelibname, obj->code_page TSRMLS_CC);
|
||||
typelib = php_com_load_typelib(typelibname, CP_THREAD_ACP TSRMLS_CC);
|
||||
}
|
||||
|
||||
if (!gotguid && dispname && typelib) {
|
||||
|
||||
+31
-5
@@ -1228,10 +1228,22 @@ PHP_FUNCTION(curl_copy_handle)
|
||||
|
||||
dupch->cp = cp;
|
||||
dupch->uses = 0;
|
||||
if (ch->handlers->write->stream) {
|
||||
zval_add_ref(dupch->handlers->write->stream);
|
||||
dupch->handlers->write->stream = ch->handlers->write->stream;
|
||||
}
|
||||
dupch->handlers->write->method = ch->handlers->write->method;
|
||||
dupch->handlers->write->type = ch->handlers->write->type;
|
||||
if (ch->handlers->read->stream) {
|
||||
zval_add_ref(ch->handlers->read->stream);
|
||||
}
|
||||
dupch->handlers->read->stream = ch->handlers->read->stream;
|
||||
dupch->handlers->read->method = ch->handlers->read->method;
|
||||
dupch->handlers->write_header->method = ch->handlers->write_header->method;
|
||||
if (ch->handlers->write_header->stream) {
|
||||
zval_add_ref(ch->handlers->write_header->stream);
|
||||
}
|
||||
dupch->handlers->write_header->stream = ch->handlers->write_header->stream;
|
||||
|
||||
dupch->handlers->write->fp = ch->handlers->write->fp;
|
||||
dupch->handlers->write_header->fp = ch->handlers->write_header->fp;
|
||||
@@ -1361,7 +1373,8 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
#endif
|
||||
convert_to_long_ex(zvalue);
|
||||
#if LIBCURL_VERSION_NUM >= 0x71304
|
||||
if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) {
|
||||
if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&
|
||||
((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is set");
|
||||
RETVAL_FALSE;
|
||||
return 1;
|
||||
@@ -1456,9 +1469,10 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
switch (option) {
|
||||
case CURLOPT_FILE:
|
||||
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
zend_list_addref(Z_LVAL_PP(zvalue));
|
||||
zval_add_ref(zvalue);
|
||||
ch->handlers->write->fp = fp;
|
||||
ch->handlers->write->method = PHP_CURL_FILE;
|
||||
ch->handlers->write->stream = *zvalue;
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
|
||||
RETVAL_FALSE;
|
||||
@@ -1467,9 +1481,10 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
break;
|
||||
case CURLOPT_WRITEHEADER:
|
||||
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
zend_list_addref(Z_LVAL_PP(zvalue));
|
||||
zval_add_ref(zvalue);
|
||||
ch->handlers->write_header->fp = fp;
|
||||
ch->handlers->write_header->method = PHP_CURL_FILE;
|
||||
ch->handlers->write_header->stream = *zvalue;
|
||||
} else {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
|
||||
RETVAL_FALSE;
|
||||
@@ -1477,9 +1492,10 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
}
|
||||
break;
|
||||
case CURLOPT_INFILE:
|
||||
zend_list_addref(Z_LVAL_PP(zvalue));
|
||||
zval_add_ref(zvalue);
|
||||
ch->handlers->read->fp = fp;
|
||||
ch->handlers->read->fd = Z_LVAL_PP(zvalue);
|
||||
ch->handlers->read->stream = *zvalue;
|
||||
break;
|
||||
case CURLOPT_STDERR:
|
||||
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
|
||||
@@ -1609,7 +1625,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
|
||||
error = curl_formadd(&first, &last,
|
||||
CURLFORM_COPYNAME, string_key,
|
||||
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
|
||||
CURLFORM_FILENAME, filename ? filename : postval,
|
||||
CURLFORM_FILENAME, filename ? filename + sizeof(";filename=") - 1 : postval,
|
||||
CURLFORM_CONTENTTYPE, type ? type + sizeof(";type=") - 1 : "application/octet-stream",
|
||||
CURLFORM_FILE, postval,
|
||||
CURLFORM_END);
|
||||
@@ -2128,6 +2144,16 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
|
||||
efree(ch->header.str);
|
||||
}
|
||||
|
||||
if (ch->handlers->write_header->stream) {
|
||||
zval_ptr_dtor(&ch->handlers->write_header->stream);
|
||||
}
|
||||
if (ch->handlers->write->stream) {
|
||||
zval_ptr_dtor(&ch->handlers->write->stream);
|
||||
}
|
||||
if (ch->handlers->read->stream) {
|
||||
zval_ptr_dtor(&ch->handlers->read->stream);
|
||||
}
|
||||
|
||||
efree(ch->handlers->write);
|
||||
efree(ch->handlers->write_header);
|
||||
efree(ch->handlers->read);
|
||||
|
||||
@@ -86,6 +86,7 @@ typedef struct {
|
||||
smart_str buf;
|
||||
int method;
|
||||
int type;
|
||||
zval *stream;
|
||||
} php_curl_write;
|
||||
|
||||
typedef struct {
|
||||
@@ -94,6 +95,7 @@ typedef struct {
|
||||
FILE *fp;
|
||||
long fd;
|
||||
int method;
|
||||
zval *stream;
|
||||
} php_curl_read;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -16,6 +16,8 @@ PHP_ADD_INCLUDE([$ext_srcdir/lib])
|
||||
|
||||
PHP_INSTALL_HEADERS([ext/date], [php_date.h lib/timelib.h lib/timelib_structs.h lib/timelib_config.h])
|
||||
|
||||
AC_CHECK_FUNCS([llabs])
|
||||
|
||||
cat > $ext_builddir/lib/timelib_config.h <<EOF
|
||||
#ifdef PHP_WIN32
|
||||
# include "config.w32.h"
|
||||
|
||||
+746
-779
File diff suppressed because it is too large.
Load diff
+18
-9
@@ -30,16 +30,14 @@
|
||||
#include "lib/timelib.h"
|
||||
#include <time.h>
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#ifndef HAVE_LLABS
|
||||
# ifdef PHP_WIN32
|
||||
static __inline __int64 llabs( __int64 i ) { return i >= 0? i: -i; }
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && __GNUC__ < 3
|
||||
# elif defined(__GNUC__) && __GNUC__ < 3
|
||||
static __inline __int64_t llabs( __int64_t i ) { return i >= 0 ? i : -i; }
|
||||
#endif
|
||||
|
||||
#if defined(NETWARE) && defined(__MWERKS__)
|
||||
# elif defined(NETWARE) && defined(__MWERKS__)
|
||||
static __inline long long llabs( long long i ) { return i >= 0 ? i : -i; }
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* {{{ arginfo */
|
||||
@@ -388,6 +386,7 @@ PHP_RSHUTDOWN_FUNCTION(date)
|
||||
FREE_HASHTABLE(DATEG(tzcache));
|
||||
DATEG(tzcache) = NULL;
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -596,7 +595,17 @@ static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC)
|
||||
return env;
|
||||
}
|
||||
/* Check config setting for default timezone */
|
||||
if (DATEG(default_timezone) && (strlen(DATEG(default_timezone)) > 0) && timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) {
|
||||
if (!DATEG(default_timezone)) {
|
||||
/* Special case: ext/date wasn't initialized yet */
|
||||
zval ztz;
|
||||
|
||||
if (SUCCESS == zend_get_configuration_directive("date.timezone", sizeof("date.timezone"), &ztz) &&
|
||||
Z_TYPE(ztz) == IS_STRING &&
|
||||
Z_STRLEN(ztz) > 0 &&
|
||||
timelib_timezone_id_is_valid(Z_STRVAL(ztz), tzdb)) {
|
||||
return Z_STRVAL(ztz);
|
||||
}
|
||||
} else if (*DATEG(default_timezone) && timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) {
|
||||
return DATEG(default_timezone);
|
||||
}
|
||||
#if HAVE_TM_ZONE
|
||||
@@ -2456,7 +2465,7 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su
|
||||
}
|
||||
|
||||
timelib_unixtime2local(t, time);
|
||||
rs = timelib_astro_rise_set_altitude(t, longitude, latitude, altitude, calc_sunset?0:1, &h_rise, &h_set, &rise, &set, &transit);
|
||||
rs = timelib_astro_rise_set_altitude(t, longitude, latitude, altitude, 1, &h_rise, &h_set, &rise, &set, &transit);
|
||||
timelib_time_dtor(t);
|
||||
|
||||
if (rs != 0) {
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -113,13 +113,13 @@ bool(false)
|
||||
bool(false)
|
||||
|
||||
--int 12345--
|
||||
string(5) "09:52"
|
||||
float(9.882%d)
|
||||
int(1218169377)
|
||||
string(5) "09:51"
|
||||
float(9.855%d)
|
||||
int(1218169278)
|
||||
|
||||
--int -12345--
|
||||
string(5) "09:54"
|
||||
float(9.909%d)
|
||||
float(9.9097820911118)
|
||||
int(1218169475)
|
||||
|
||||
--empty array--
|
||||
|
||||
@@ -113,9 +113,9 @@ bool(false)
|
||||
bool(false)
|
||||
|
||||
--int 12345--
|
||||
string(5) "19:19"
|
||||
float(19.319%d)
|
||||
int(1218203349)
|
||||
string(5) "19:20"
|
||||
float(19.340%d)
|
||||
int(1218203424)
|
||||
|
||||
--int -12345--
|
||||
bool(false)
|
||||
|
||||
File renamed without changes.
File diff suppressed because it is too large.
Load diff
@@ -1252,6 +1252,18 @@ PHP_FUNCTION(dom_document_import_node)
|
||||
if (!retnodep) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if ((retnodep->type == XML_ATTRIBUTE_NODE) && (nodep->ns != NULL)) {
|
||||
xmlNsPtr nsptr = NULL;
|
||||
xmlNodePtr root = xmlDocGetRootElement(docp);
|
||||
|
||||
nsptr = xmlSearchNsByHref (nodep->doc, root, nodep->ns->href);
|
||||
if (nsptr == NULL) {
|
||||
int errorcode;
|
||||
nsptr = dom_get_ns(root, nodep->ns->href, &errorcode, nodep->ns->prefix);
|
||||
}
|
||||
xmlSetNs(retnodep, nsptr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,6 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval **retval TSRMLS_
|
||||
xmlDtdPtr dtdptr;
|
||||
xmlDtd *intsubset;
|
||||
xmlOutputBuffer *buff = NULL;
|
||||
xmlChar *strintsubset;
|
||||
|
||||
dtdptr = (xmlDtdPtr) dom_object_get_node(obj);
|
||||
|
||||
@@ -216,9 +215,8 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval **retval TSRMLS_
|
||||
if (buff != NULL) {
|
||||
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 0, 0, NULL);
|
||||
xmlOutputBufferFlush(buff);
|
||||
strintsubset = xmlStrndup(buff->buffer->content, buff->buffer->use);
|
||||
ZVAL_STRINGL(*retval, buff->buffer->content, buff->buffer->use, 1);
|
||||
(void)xmlOutputBufferClose(buff);
|
||||
ZVAL_STRING(*retval, (char *) strintsubset, 1);
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1778,7 +1778,7 @@ PHP_FUNCTION(dom_node_get_feature)
|
||||
/* }}} end dom_node_get_feature */
|
||||
|
||||
|
||||
/* {{{ proto DomUserData dom_node_set_user_data(string key, DomUserData data, userdatahandler handler);
|
||||
/* {{{ proto mixed dom_node_set_user_data(string key, mixed data, userdatahandler handler);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData
|
||||
Since: DOM Level 3
|
||||
*/
|
||||
@@ -1789,7 +1789,7 @@ PHP_FUNCTION(dom_node_set_user_data)
|
||||
/* }}} end dom_node_set_user_data */
|
||||
|
||||
|
||||
/* {{{ proto DomUserData dom_node_get_user_data(string key);
|
||||
/* {{{ proto mixed dom_node_get_user_data(string key);
|
||||
URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData
|
||||
Since: DOM Level 3
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
--TEST--
|
||||
Bug #47848 (importNode doesn't preserve attribute namespaces)
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$aDOM = new DOMDocument();
|
||||
$aDOM->appendChild($aDOM->createElementNS('http://friend2friend.net/','f2f:a'));
|
||||
|
||||
$fromdom = new DOMDocument();
|
||||
$fromdom->loadXML('<data xmlns:ai="http://altruists.org" ai:attr="namespaced" />');
|
||||
|
||||
$attr= $fromdom->firstChild->attributes->item(0);
|
||||
|
||||
$att = $aDOM->importNode($attr);
|
||||
|
||||
$aDOM->documentElement->appendChild($aDOM->importNode($attr, true));
|
||||
|
||||
echo $aDOM->saveXML();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
<?xml version="1.0"?>
|
||||
<f2f:a xmlns:f2f="http://friend2friend.net/" xmlns:ai="http://altruists.org" ai:attr="namespaced"/>
|
||||
@@ -3881,11 +3881,7 @@ static int exif_read_file(image_info_type *ImageInfo, char *FileName, int read_t
|
||||
}
|
||||
|
||||
/* Store file date/time. */
|
||||
#ifdef NETWARE
|
||||
ImageInfo->FileDateTime = st.st_mtime.tv_sec;
|
||||
#else
|
||||
ImageInfo->FileDateTime = st.st_mtime;
|
||||
#endif
|
||||
ImageInfo->FileSize = st.st_size;
|
||||
/*exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Opened stream is file: %d", ImageInfo->FileSize);*/
|
||||
}
|
||||
|
||||
@@ -472,7 +472,7 @@ void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
|
||||
void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
|
||||
{
|
||||
/* From http://cvs.php.net/co.php/pear/HTML_QuickForm/QuickForm/Rule/Email.php?r=1.4 */
|
||||
const char regexp[] = "/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([A-Za-z0-9_][A-Za-z0-9_\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]*(\\.[A-Za-z0-9_\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\^\\`\\|\\{\\}]*)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9])(([A-Za-z0-9\\-])*([A-Za-z0-9]))?(\\.(?=[A-Za-z0-9\\-]))?)+[A-Za-z]+))$/D";
|
||||
const char regexp[] = "/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([A-Za-z0-9_][A-Za-z0-9_\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\=\\?\\^\\`\\|\\{\\}]*(\\.[A-Za-z0-9_\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\=\\?\\^\\`\\|\\{\\}]*)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9])(([A-Za-z0-9\\-])*([A-Za-z0-9]))?(\\.(?=[A-Za-z0-9\\-]))?)+[A-Za-z]+))$/D";
|
||||
|
||||
pcre *re = NULL;
|
||||
pcre_extra *pcre_extra = NULL;
|
||||
|
||||
@@ -21,7 +21,7 @@ stripped PHP 1 foo@bar.com http://a.b.c 1.2.3.4 123 12
|
||||
encoded PHP 1 foo%40bar.com http%3A%2F%2Fa.b.c 1.2.3.4 123 123abc%3C%3E%28%29 O%27Henry %ED%95%98%ED%8D%BC
|
||||
special_chars PHP 1 foo@bar.com http://a.b.c 1.2.3.4 123 123abc<>() O'Henry 하퍼
|
||||
unsafe_raw PHP 1 foo@bar.com http://a.b.c 1.2.3.4 123 123abc<>() O'Henry 하퍼
|
||||
email PHP 1 foo@bar.com http//a.b.c 1.2.3.4 123 123abc O'Henry
|
||||
email PHP 1 foo@bar.com httpa.b.c 1.2.3.4 123 123abc O'Henry
|
||||
url PHP 1 foo@bar.com http://a.b.c 1.2.3.4 123 123abc<>() O'Henry
|
||||
number_int 1 1234 123 123
|
||||
number_float 1 1234 123 123
|
||||
|
||||
@@ -12,12 +12,8 @@ var_dump(filter_var($s, FILTER_VALIDATE_INT));
|
||||
|
||||
$s = sprintf("%d", -PHP_INT_MAX);
|
||||
var_dump(is_long(filter_var($s, FILTER_VALIDATE_INT)));
|
||||
|
||||
$s = sprintf("%.0f", ~(PHP_INT_MAX)-1);
|
||||
var_dump(filter_var($s, FILTER_VALIDATE_INT));
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(false)
|
||||
bool(true)
|
||||
bool(false)
|
||||
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses containing = or ?)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$email_address = "test=mail@example.com";
|
||||
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
|
||||
|
||||
$email_address = "test-mail@example.com";
|
||||
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
|
||||
|
||||
$email_address = "test+mail@example.com";
|
||||
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
|
||||
|
||||
$email_address = "test?mail@example.com";
|
||||
var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
%unicode|string%(21) "test=mail@example.com"
|
||||
%unicode|string%(21) "test-mail@example.com"
|
||||
%unicode|string%(21) "test+mail@example.com"
|
||||
%unicode|string%(21) "test?mail@example.com"
|
||||
+1
-1
@@ -1699,7 +1699,7 @@ ftp_nb_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t typ
|
||||
char arg[11];
|
||||
|
||||
if (ftp == NULL) {
|
||||
goto bail;
|
||||
return PHP_FTP_FAILED;
|
||||
}
|
||||
|
||||
if (!ftp_type(ftp, type)) {
|
||||
|
||||
+1
-1
@@ -4503,7 +4503,7 @@ PHP_FUNCTION(imagepsencodefont)
|
||||
T1_DeleteAllSizes(*f_ind);
|
||||
if (T1_ReencodeFont(*f_ind, enc_vector)) {
|
||||
T1_DeleteEncoding(enc_vector);
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't reencode font");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't re-encode font");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,9 @@ int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag)
|
||||
if (!gdGetWord(&im->colorsTotal, in)) {
|
||||
goto fail1;
|
||||
}
|
||||
if (im->colorsTotal > gdMaxColors) {
|
||||
goto fail1;
|
||||
}
|
||||
}
|
||||
/* Int to accommodate truecolor single-color transparency */
|
||||
if (!gdGetInt(&im->transparent, in)) {
|
||||
|
||||
@@ -1090,6 +1090,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
|
||||
|
||||
if (render) {
|
||||
if (image->format != ft_glyph_format_bitmap && FT_Glyph_To_Bitmap(&image, ft_render_mode_normal, 0, 1)) {
|
||||
FT_Done_Glyph(image);
|
||||
if (tmpstr) {
|
||||
gdFree(tmpstr);
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Test max colors for a gd image.
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) {
|
||||
die("skip gd extension not available\n");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
imagecreatefromgd(dirname(__FILE__) . '/crafted.gd2');
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Warning: imagecreatefromgd(): '%scrafted.gd2' is not a valid GD file in %s on line %d
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
image_type_to_mime_type()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
|
||||
require_once('skipif_imagetype.inc');
|
||||
if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -61,4 +60,4 @@ string(18) "image/vnd.wap.wbmp"
|
||||
string(24) "application/octet-stream"
|
||||
string(9) "image/xbm"
|
||||
|
||||
Done image_type_to_mime_type() test
|
||||
Done image_type_to_mime_type() test
|
||||
@@ -3,7 +3,7 @@ imagecopyresampled()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!function_exists('imagecopyresampled')) die('skip imagecopyresampled() not available');
|
||||
require_once('skipif_imagetype.inc');
|
||||
if (!(imagetype() & IMG_PNG)) die('skip PNG Support is not enabled');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -3,7 +3,7 @@ imagedashedline()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!function_exists('imagedashedline')) die('skip imagedashedline() not available');
|
||||
require_once('skipif_imagetype.inc');
|
||||
if (!(imagetype() & IMG_PNG)) die('skip PNG Support is not enabled');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -3,7 +3,7 @@ imagefilledpolygon()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!function_exists('imagefilledpolygon')) die('skip imagefilledpolygon() not available');
|
||||
require_once('skipif_imagetype.inc');
|
||||
if (!(imagetype() & IMG_PNG)) die('skip PNG Support is not enabled');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
--TEST--
|
||||
Feature Request #50283 (allow base in gmp_strval to use full range: 2 to 62, and -2 to -36)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("gmp")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$a = gmp_init("0x41682179fbf5");
|
||||
printf("Decimal: %s, -36-based: %s\n", gmp_strval($a), gmp_strval($a,-36));
|
||||
printf("Decimal: %s, 36-based: %s\n", gmp_strval($a), gmp_strval($a,36));
|
||||
printf("Decimal: %s, -1-based: %s\n", gmp_strval($a), gmp_strval($a,-1));
|
||||
printf("Decimal: %s, 1-based: %s\n", gmp_strval($a), gmp_strval($a,1));
|
||||
printf("Decimal: %s, -37-based: %s\n", gmp_strval($a), gmp_strval($a,-37));
|
||||
printf("Decimal: %s, 37-based: %s\n", gmp_strval($a), gmp_strval($a,37));
|
||||
printf("Decimal: %s, 62-based: %s\n", gmp_strval($a), gmp_strval($a,62));
|
||||
printf("Decimal: %s, 63-based: %s\n\n", gmp_strval($a), gmp_strval($a,63));
|
||||
printf("Base 32 and 62-based: %s\n", gmp_strval(gmp_init("gh82179fbf5", 32), 62));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Decimal: 71915494046709, -36-based: PHPISCOOL
|
||||
Decimal: 71915494046709, 36-based: phpiscool
|
||||
|
||||
Warning: gmp_strval(): Bad base for conversion: -1 in %s on line 5
|
||||
Decimal: 71915494046709, -1-based:
|
||||
|
||||
Warning: gmp_strval(): Bad base for conversion: 1 in %s on line 6
|
||||
Decimal: 71915494046709, 1-based:
|
||||
|
||||
Warning: gmp_strval(): Bad base for conversion: -37 in %s on line 7
|
||||
Decimal: 71915494046709, -37-based:
|
||||
Decimal: 71915494046709, 37-based: KHKATELJF
|
||||
Decimal: 71915494046709, 62-based: KQ6yq741
|
||||
|
||||
Warning: gmp_strval(): Bad base for conversion: 63 in %s on line 10
|
||||
Decimal: 71915494046709, 63-based:
|
||||
|
||||
Base 32 and 62-based: 1NHkAcdIiD
|
||||
@@ -5,6 +5,10 @@ Test iconv_get_encoding()/iconv_set_encoding() function : basic functionality
|
||||
extension_loaded('iconv') or die('skip');
|
||||
function_exists('iconv_get_encoding') or die("skip iconv_get_encoding() is not available in this build");
|
||||
?>
|
||||
--INI--
|
||||
iconv.input_encoding=ISO-8859-1
|
||||
iconv.internal_encoding=ISO-8859-1
|
||||
iconv.output_encoding=ISO-8859-1
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : mixed iconv_get_encoding([string type])
|
||||
@@ -91,4 +95,4 @@ array(3) {
|
||||
["internal_encoding"]=>
|
||||
string(5) "UTF-8"
|
||||
}
|
||||
Done
|
||||
Done
|
||||
@@ -5,6 +5,10 @@ Test iconv_substr() function : basic functionality
|
||||
extension_loaded('iconv') or die('skip');
|
||||
function_exists('iconv_substr') or die("skip iconv_substr() is not available in this build");
|
||||
?>
|
||||
--INI--
|
||||
iconv.input_encoding=ISO-8859-1
|
||||
iconv.internal_encoding=ISO-8859-1
|
||||
iconv.output_encoding=ISO-8859-1
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : string iconv_substr(string str, int offset, [int length, string charset])
|
||||
@@ -52,4 +56,4 @@ string(14) "a5e69cace8aa9e"
|
||||
|
||||
-- Multibyte string 2 --
|
||||
string(42) "e8aa9ee38386e382ade382b9e38388e381a7e38199"
|
||||
Done
|
||||
Done
|
||||
@@ -115,6 +115,7 @@ zend_function_entry imap_functions[] = {
|
||||
PHP_FE(imap_delete, NULL)
|
||||
PHP_FE(imap_undelete, NULL)
|
||||
PHP_FE(imap_check, NULL)
|
||||
PHP_FE(imap_listscan, NULL)
|
||||
PHP_FE(imap_mail_copy, NULL)
|
||||
PHP_FE(imap_mail_move, NULL)
|
||||
PHP_FE(imap_mail_compose, NULL)
|
||||
|
||||
+11
-7
@@ -1061,17 +1061,21 @@ PHP_FUNCTION(ldap_get_entries)
|
||||
ldap = ld->link;
|
||||
num_entries = ldap_count_entries(ldap, ldap_result);
|
||||
|
||||
if (num_entries == 0) return;
|
||||
num_entries = 0;
|
||||
|
||||
ldap_result_entry = ldap_first_entry(ldap, ldap_result);
|
||||
if (ldap_result_entry == NULL) RETURN_FALSE;
|
||||
|
||||
array_init(return_value);
|
||||
add_assoc_long(return_value, "count", num_entries);
|
||||
|
||||
while (ldap_result_entry != NULL) {
|
||||
if (num_entries == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
ldap_result_entry = ldap_first_entry(ldap, ldap_result);
|
||||
if (ldap_result_entry == NULL) {
|
||||
zval_dtor(return_value);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
num_entries = 0;
|
||||
while (ldap_result_entry != NULL) {
|
||||
MAKE_STD_ZVAL(tmp1);
|
||||
array_init(tmp1);
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
--TEST--
|
||||
Bug #48696 (ldap_read() segfaults with invalid parameters)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once dirname(__FILE__) .'/skipif.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -626,6 +626,9 @@ static PHP_MINIT_FUNCTION(libxml)
|
||||
#if LIBXML_VERSION >= 20621
|
||||
REGISTER_LONG_CONSTANT("LIBXML_COMPACT", XML_PARSE_COMPACT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("LIBXML_NOXMLDECL", XML_SAVE_NO_DECL, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
#if LIBXML_VERSION >= 20703
|
||||
REGISTER_LONG_CONSTANT("LIBXML_PARSEHUGE", XML_PARSE_HUGE, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
REGISTER_LONG_CONSTANT("LIBXML_NOEMPTYTAG", LIBXML_SAVE_NOEMPTYTAG, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ EOF
|
||||
|
||||
AC_DEFUN([PHP_MBSTRING_SETUP_MBREGEX], [
|
||||
if test "$PHP_MBREGEX" = "yes"; then
|
||||
AC_CACHE_CHECK(for variable length prototypes and stdarg.h, cv_php_mbstring_stdarg, [
|
||||
AC_CACHE_CHECK(for variable length prototypes and stdarg.h, php_cv_mbstring_stdarg, [
|
||||
AC_TRY_RUN([
|
||||
#include <stdarg.h>
|
||||
int foo(int x, ...) {
|
||||
@@ -72,14 +72,14 @@ int foo(int x, ...) {
|
||||
return 0;
|
||||
}
|
||||
int main() { return foo(10, "", 3.14); }
|
||||
], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], [
|
||||
], [php_cv_mbstring_stdarg=yes], [php_cv_mbstring_stdarg=no], [
|
||||
dnl cross-compile needs something here
|
||||
case $host_alias in
|
||||
*netware*)
|
||||
cv_php_mbstring_stdarg=yes
|
||||
php_cv_mbstring_stdarg=yes
|
||||
;;
|
||||
*)
|
||||
cv_php_mbstring_stdarg=no
|
||||
php_cv_mbstring_stdarg=no
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
@@ -127,7 +127,7 @@ int mbfl_filt_conv_utf16_wchar(int c, mbfl_convert_filter *filter)
|
||||
int n, endian;
|
||||
|
||||
endian = filter->status & 0xff00;
|
||||
switch (filter->status & 0xff) {
|
||||
switch (filter->status & 0x0f) {
|
||||
case 0:
|
||||
if (endian) {
|
||||
n = c & 0xff;
|
||||
@@ -144,15 +144,8 @@ int mbfl_filt_conv_utf16_wchar(int c, mbfl_convert_filter *filter)
|
||||
n = c & 0xff;
|
||||
}
|
||||
n |= filter->cache & 0xffff;
|
||||
filter->status &= ~0xff;
|
||||
if (n == 0xfffe) {
|
||||
if (endian) {
|
||||
filter->status = 0; /* big-endian */
|
||||
} else {
|
||||
filter->status = 0x100; /* little-endian */
|
||||
}
|
||||
CK((*filter->output_function)(0xfeff, filter->data));
|
||||
} else if (n >= 0xd800 && n < 0xdc00) {
|
||||
filter->status &= ~0x0f;
|
||||
if (n >= 0xd800 && n < 0xdc00) {
|
||||
filter->cache = ((n & 0x3ff) << 16) + 0x400000;
|
||||
} else if (n >= 0xdc00 && n < 0xe000) {
|
||||
n &= 0x3ff;
|
||||
@@ -166,7 +159,21 @@ int mbfl_filt_conv_utf16_wchar(int c, mbfl_convert_filter *filter)
|
||||
CK((*filter->output_function)(n, filter->data));
|
||||
}
|
||||
} else {
|
||||
int is_first = filter->status & 0x10;
|
||||
filter->cache = 0;
|
||||
filter->status |= 0x10;
|
||||
if (!is_first) {
|
||||
if (n == 0xfffe) {
|
||||
if (endian) {
|
||||
filter->status &= ~0x100; /* big-endian */
|
||||
} else {
|
||||
filter->status |= 0x100; /* little-endian */
|
||||
}
|
||||
break;
|
||||
} else if (n == 0xfeff) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
CK((*filter->output_function)(n, filter->data));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -215,7 +215,7 @@ static int mbfl_filt_ident_utf8(int c, mbfl_identify_filter *filter)
|
||||
if (c < 0x80) {
|
||||
if (c < 0) {
|
||||
filter->flag = 1; /* bad */
|
||||
} else if (c != 0 && filter->status) {
|
||||
} else if (filter->status) {
|
||||
filter->flag = 1; /* bad */
|
||||
}
|
||||
filter->status = 0;
|
||||
|
||||
@@ -622,7 +622,7 @@ mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int el
|
||||
if (!encoding) {
|
||||
for (i = 0; i < num; i++) {
|
||||
filter = &flist[i];
|
||||
if (!filter->flag) {
|
||||
if (!filter->flag && (!strict || !filter->status)) {
|
||||
encoding = filter->encoding;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2272,9 +2272,6 @@ PHP_FUNCTION(mb_strcut)
|
||||
if (from > Z_STRLEN_PP(arg1)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (((unsigned) from + (unsigned) len) > Z_STRLEN_PP(arg1)) {
|
||||
len = Z_STRLEN_PP(arg1) - from;
|
||||
}
|
||||
|
||||
ret = mbfl_strcut(&string, &result, from, len);
|
||||
if (ret != NULL) {
|
||||
|
||||
@@ -38,7 +38,7 @@ foreach($inputs as $input) {
|
||||
};
|
||||
?>
|
||||
|
||||
--EXPECTF----
|
||||
--EXPECTF--
|
||||
|
||||
-- Iteration 1 --
|
||||
Without $regs arg:
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #45722 (mb_check_encoding() crashes)
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(mb_check_encoding("&\xc2\xb7 TEST TEST TEST TEST TEST TEST", "HTML-ENTITIES"));
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #49354 (mb_strcut() cuts wrong length when offset is in the middle of a multibyte character)
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$crap = 'AåBäCöDü';
|
||||
var_dump(mb_strcut($crap, 0, 100, 'UTF-8'));
|
||||
var_dump(mb_strcut($crap, 1, 100, 'UTF-8'));
|
||||
var_dump(mb_strcut($crap, 2, 100, 'UTF-8'));
|
||||
var_dump(mb_strcut($crap, 3, 100, 'UTF-8'));
|
||||
var_dump(mb_strcut($crap, 12, 100, 'UTF-8'));
|
||||
var_dump(mb_strcut($crap, 13, 100, 'UTF-8'));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(12) "AåBäCöDü"
|
||||
string(11) "åBäCöDü"
|
||||
string(11) "åBäCöDü"
|
||||
string(9) "BäCöDü"
|
||||
string(0) ""
|
||||
bool(false)
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #49528 (UTF-16 strings prefixed by BOM wrongly converted)
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(bin2hex(mb_convert_encoding("\xff\xfe\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
|
||||
var_dump(bin2hex(mb_convert_encoding("\xfe\xff\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
|
||||
var_dump(bin2hex(mb_convert_encoding("\xff\xfe\xff\xfe\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
|
||||
var_dump(bin2hex(mb_convert_encoding("\xff\xfe\xfe\xff\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
|
||||
var_dump(bin2hex(mb_convert_encoding("\xfe\xff\xff\xfe\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
|
||||
var_dump(bin2hex(mb_convert_encoding("\xfe\xff\xfe\xff\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(8) "02010403"
|
||||
string(8) "01020304"
|
||||
string(12) "feff02010403"
|
||||
string(12) "fffe02010403"
|
||||
string(12) "fffe01020304"
|
||||
string(12) "feff01020304"
|
||||
@@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #49536 (mb_detect_encoding() returns incorrect results when strict_mode is turned on)
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
// non-strict mode
|
||||
var_dump(mb_detect_encoding("A\x81", "SJIS", false));
|
||||
// strict mode
|
||||
var_dump(mb_detect_encoding("A\x81", "SJIS", true));
|
||||
// non-strict mode
|
||||
var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", false));
|
||||
// strict mode
|
||||
var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", true));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(4) "SJIS"
|
||||
bool(false)
|
||||
string(5) "UTF-8"
|
||||
bool(false)
|
||||
@@ -613,6 +613,7 @@ PHP_FUNCTION(mcrypt_generic_deinit)
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not terminate encryption specifier");
|
||||
RETURN_FALSE
|
||||
}
|
||||
pm->init = 0;
|
||||
RETURN_TRUE
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--TEST---
|
||||
--TEST--
|
||||
Bug #46010 (warnings incorrectly generated for iv in ecb mode)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
--TEST--
|
||||
Bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
|
||||
mcrypt_generic_init($td, 'aaaaaaaa', 'aaaaaaaa');
|
||||
mcrypt_generic_deinit($td);
|
||||
echo mcrypt_generic($td, 'aaaaaaaa');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug49738.php on line 5
|
||||
@@ -166,6 +166,8 @@
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
#define PHP_MIME_MAGIC_FILE_PATH PHP_PREFIX "\\magic.mime"
|
||||
#elif NETWARE
|
||||
#define PHP_MIME_MAGIC_FILE_PATH PHP_PREFIX "/magic.mime"
|
||||
#endif
|
||||
|
||||
#define BYTE 1
|
||||
|
||||
+5
-1
@@ -1003,7 +1003,11 @@ PHP_MYSQLI_API void php_mysqli_set_error(long mysql_errno, char *mysql_err TSRML
|
||||
if (MyG(error_msg)) {
|
||||
efree(MyG(error_msg));
|
||||
}
|
||||
MyG(error_msg) = estrdup(mysql_err);
|
||||
if(mysql_err && *mysql_err) {
|
||||
MyG(error_msg) = estrdup(mysql_err);
|
||||
} else {
|
||||
MyG(error_msg) = NULL;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -1848,14 +1848,13 @@ PHP_FUNCTION(mysqli_stmt_attr_set)
|
||||
zval *mysql_stmt;
|
||||
ulong mode;
|
||||
ulong attr;
|
||||
int rc;
|
||||
|
||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &mysql_stmt, mysqli_stmt_class_entry, &attr, &mode) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID);
|
||||
|
||||
if ((rc = mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode))) {
|
||||
if (!mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
RETURN_TRUE;
|
||||
|
||||
+6
-14
@@ -725,6 +725,10 @@ int odbc_bindcols(odbc_result *result TSRMLS_DC)
|
||||
NULL, 0, NULL, &displaysize);
|
||||
displaysize = displaysize <= result->longreadlen ? displaysize :
|
||||
result->longreadlen;
|
||||
/* Workaround for Oracle ODBC Driver bug (#50162) when fetching TIMESTAMP column */
|
||||
if (result->values[i].coltype == SQL_TIMESTAMP) {
|
||||
displaysize += 3;
|
||||
}
|
||||
result->values[i].value = (char *)emalloc(displaysize + 1);
|
||||
rc = SQLBindCol(result->stmt, (SQLUSMALLINT)(i+1), SQL_C_CHAR, result->values[i].value,
|
||||
displaysize + 1, &result->values[i].vallen);
|
||||
@@ -925,13 +929,7 @@ PHP_FUNCTION(odbc_prepare)
|
||||
/* Try to set CURSOR_TYPE to dynamic. Driver will replace this with other
|
||||
type if not possible.
|
||||
*/
|
||||
int cursortype = ODBCG(default_cursortype);
|
||||
if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, cursortype) == SQL_ERROR) {
|
||||
odbc_sql_error(conn, result->stmt, " SQLSetStmtOption");
|
||||
SQLFreeStmt(result->stmt, SQL_DROP);
|
||||
efree(result);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, ODBCG(default_cursortype));
|
||||
}
|
||||
} else {
|
||||
result->fetch_abs = 0;
|
||||
@@ -1346,13 +1344,7 @@ PHP_FUNCTION(odbc_exec)
|
||||
/* Try to set CURSOR_TYPE to dynamic. Driver will replace this with other
|
||||
type if not possible.
|
||||
*/
|
||||
int cursortype = ODBCG(default_cursortype);
|
||||
if (SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, cursortype) == SQL_ERROR) {
|
||||
odbc_sql_error(conn, result->stmt, " SQLSetStmtOption");
|
||||
SQLFreeStmt(result->stmt, SQL_DROP);
|
||||
efree(result);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, ODBCG(default_cursortype));
|
||||
}
|
||||
} else {
|
||||
result->fetch_abs = 0;
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
/* Common */
|
||||
#include <time.h>
|
||||
|
||||
#ifdef NETWARE
|
||||
#define timezone _timezone /* timezone is called _timezone in LibC */
|
||||
#endif
|
||||
|
||||
#define DEFAULT_KEY_LENGTH 512
|
||||
#define MIN_KEY_LENGTH 384
|
||||
|
||||
@@ -1444,18 +1448,18 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
|
||||
int filename_len;
|
||||
char * pass;
|
||||
int pass_len;
|
||||
zval *zcert = NULL, *zpkey = NULL, *args = NULL;
|
||||
zval **zcert = NULL, *zpkey = NULL, *args = NULL;
|
||||
EVP_PKEY *priv_key = NULL;
|
||||
long certresource, keyresource;
|
||||
zval ** item;
|
||||
STACK_OF(X509) *ca = NULL;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zszs|a", &zcert, &filename, &filename_len, &zpkey, &pass, &pass_len, &args) == FAILURE)
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zszs|a", &zcert, &filename, &filename_len, &zpkey, &pass, &pass_len, &args) == FAILURE)
|
||||
return;
|
||||
|
||||
RETVAL_FALSE;
|
||||
|
||||
cert = php_openssl_x509_from_zval(&zcert, 0, &certresource TSRMLS_CC);
|
||||
cert = php_openssl_x509_from_zval(zcert, 0, &certresource TSRMLS_CC);
|
||||
if (cert == NULL) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot get cert from parameter 1");
|
||||
return;
|
||||
|
||||
@@ -28,12 +28,12 @@ function ssl_server($port) {
|
||||
$r = array($link);
|
||||
$w = array();
|
||||
$e = array();
|
||||
if (stream_select($r, $w, $e, 0, 1000) != 0)
|
||||
if (stream_select($r, $w, $e, 1, 0) != 0)
|
||||
$data .= fread($link, 8192);
|
||||
|
||||
$r = array();
|
||||
$w = array($link);
|
||||
if (stream_select($r, $w, $e, 0, 1000) != 0)
|
||||
if (stream_select($r, $w, $e, 1, 0) != 0)
|
||||
$wrote = fwrite($link, $data, strlen($data));
|
||||
|
||||
// close stuff
|
||||
@@ -59,7 +59,7 @@ function ssl_async_client($port) {
|
||||
$r = array($socket);
|
||||
$w = array();
|
||||
$e = array();
|
||||
if (stream_select($r, $w, $e, 0, 10) != 0)
|
||||
if (stream_select($r, $w, $e, 1, 0) != 0)
|
||||
{
|
||||
$data .= fread($socket, 1024);
|
||||
}
|
||||
|
||||
+35
-3
@@ -217,6 +217,7 @@ PDO_API int php_pdo_parse_data_source(const char *data_source,
|
||||
int optstart = 0;
|
||||
int nlen;
|
||||
int n_matches = 0;
|
||||
int n_semicolumns = 0;
|
||||
|
||||
i = 0;
|
||||
while (i < data_source_len) {
|
||||
@@ -235,14 +236,21 @@ PDO_API int php_pdo_parse_data_source(const char *data_source,
|
||||
|
||||
/* now we're looking for VALUE; or just VALUE<NUL> */
|
||||
semi = -1;
|
||||
n_semicolumns = 0;
|
||||
while (i < data_source_len) {
|
||||
if (data_source[i] == '\0') {
|
||||
semi = i++;
|
||||
break;
|
||||
}
|
||||
if (data_source[i] == ';') {
|
||||
semi = i++;
|
||||
break;
|
||||
if ((i + 1 >= data_source_len) || data_source[i+1] != ';') {
|
||||
semi = i++;
|
||||
break;
|
||||
} else {
|
||||
n_semicolumns++;
|
||||
i += 2;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
++i;
|
||||
}
|
||||
@@ -259,7 +267,31 @@ PDO_API int php_pdo_parse_data_source(const char *data_source,
|
||||
if (parsed[j].freeme) {
|
||||
efree(parsed[j].optval);
|
||||
}
|
||||
parsed[j].optval = estrndup(data_source + valstart, semi - valstart);
|
||||
|
||||
if (n_semicolumns == 0) {
|
||||
parsed[j].optval = estrndup(data_source + valstart, semi - valstart - n_semicolumns);
|
||||
} else {
|
||||
int vlen = semi - valstart;
|
||||
char *orig_val = data_source + valstart;
|
||||
char *new_val = (char *) emalloc(vlen - n_semicolumns + 1);
|
||||
|
||||
parsed[j].optval = new_val;
|
||||
|
||||
while (vlen && *orig_val) {
|
||||
*new_val = *orig_val;
|
||||
new_val++;
|
||||
|
||||
if (*orig_val == ';') {
|
||||
orig_val+=2;
|
||||
vlen-=2;
|
||||
} else {
|
||||
orig_val++;
|
||||
vlen--;
|
||||
}
|
||||
}
|
||||
*new_val = '\0';
|
||||
}
|
||||
|
||||
parsed[j].freeme = 1;
|
||||
++n_matches;
|
||||
break;
|
||||
|
||||
+4
-5
@@ -44,7 +44,7 @@ void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *sqlstate
|
||||
char *message = NULL;
|
||||
const char *msg;
|
||||
|
||||
if (dbh->error_mode == PDO_ERRMODE_SILENT) {
|
||||
if (dbh && dbh->error_mode == PDO_ERRMODE_SILENT) {
|
||||
#if 0
|
||||
/* BUG: if user is running in silent mode and hits an error at the driver level
|
||||
* when they use the PDO methods to call up the error information, they may
|
||||
@@ -71,7 +71,7 @@ void pdo_raise_impl_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *sqlstate
|
||||
spprintf(&message, 0, "SQLSTATE[%s]: %s", *pdo_err, msg);
|
||||
}
|
||||
|
||||
if (dbh->error_mode != PDO_ERRMODE_EXCEPTION) {
|
||||
if (dbh && dbh->error_mode != PDO_ERRMODE_EXCEPTION) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", message);
|
||||
} else {
|
||||
zval *ex, *info;
|
||||
@@ -110,7 +110,7 @@ void pdo_handle_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
|
||||
char *message = NULL;
|
||||
zval *info = NULL;
|
||||
|
||||
if (dbh->error_mode == PDO_ERRMODE_SILENT) {
|
||||
if (dbh == NULL || dbh->error_mode == PDO_ERRMODE_SILENT) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1091,8 +1091,7 @@ static PHP_METHOD(PDO, quote)
|
||||
char *qstr;
|
||||
int qlen;
|
||||
|
||||
if (FAILURE == zend_parse_parameters(1 TSRMLS_CC, "s|l", &str, &str_len,
|
||||
¶mtype)) {
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &str, &str_len, ¶mtype)) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
+68
-52
@@ -509,6 +509,7 @@ static PHP_METHOD(PDOStatement, execute)
|
||||
/* no changes were made */
|
||||
stmt->active_query_string = stmt->query_string;
|
||||
stmt->active_query_stringlen = stmt->query_stringlen;
|
||||
ret = 1;
|
||||
} else if (ret == -1) {
|
||||
/* something broke */
|
||||
PDO_HANDLE_STMT_ERR();
|
||||
@@ -1102,6 +1103,32 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
|
||||
}
|
||||
}
|
||||
|
||||
switch (how) {
|
||||
case PDO_FETCH_CLASS:
|
||||
if (ce->constructor && !(flags & PDO_FETCH_PROPS_LATE)) {
|
||||
stmt->fetch.cls.fci.object_pp = &return_value;
|
||||
stmt->fetch.cls.fcc.object_pp = &return_value;
|
||||
if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc TSRMLS_CC) == FAILURE) {
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor" TSRMLS_CC);
|
||||
return 0;
|
||||
} else {
|
||||
if (stmt->fetch.cls.retval_ptr) {
|
||||
zval_ptr_dtor(&stmt->fetch.cls.retval_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flags & PDO_FETCH_CLASSTYPE) {
|
||||
do_fetch_opt_finish(stmt, 0 TSRMLS_CC);
|
||||
stmt->fetch.cls.ce = old_ce;
|
||||
stmt->fetch.cls.ctor_args = old_ctor_args;
|
||||
stmt->fetch.cls.fci.param_count = old_arg_count;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
for (idx = 0; i < stmt->column_count; i++, idx++) {
|
||||
zval *val;
|
||||
MAKE_STD_ZVAL(val);
|
||||
@@ -1235,27 +1262,6 @@ static int do_fetch(pdo_stmt_t *stmt, int do_bind, zval *return_value,
|
||||
}
|
||||
|
||||
switch (how) {
|
||||
case PDO_FETCH_CLASS:
|
||||
if (ce->constructor && !(flags & PDO_FETCH_PROPS_LATE)) {
|
||||
stmt->fetch.cls.fci.object_pp = &return_value;
|
||||
stmt->fetch.cls.fcc.object_pp = &return_value;
|
||||
if (zend_call_function(&stmt->fetch.cls.fci, &stmt->fetch.cls.fcc TSRMLS_CC) == FAILURE) {
|
||||
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "could not call class constructor" TSRMLS_CC);
|
||||
return 0;
|
||||
} else {
|
||||
if (stmt->fetch.cls.retval_ptr) {
|
||||
zval_ptr_dtor(&stmt->fetch.cls.retval_ptr);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flags & PDO_FETCH_CLASSTYPE) {
|
||||
do_fetch_opt_finish(stmt, 0 TSRMLS_CC);
|
||||
stmt->fetch.cls.ce = old_ce;
|
||||
stmt->fetch.cls.ctor_args = old_ctor_args;
|
||||
stmt->fetch.cls.fci.param_count = old_arg_count;
|
||||
}
|
||||
break;
|
||||
|
||||
case PDO_FETCH_FUNC:
|
||||
stmt->fetch.func.fci.param_count = idx;
|
||||
stmt->fetch.func.fci.retval_ptr_ptr = &retval;
|
||||
@@ -1653,19 +1659,21 @@ static PHP_METHOD(PDOStatement, fetchAll)
|
||||
static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, int is_param) /* {{{ */
|
||||
{
|
||||
struct pdo_bound_param_data param = {0};
|
||||
long param_type = PDO_PARAM_STR;
|
||||
|
||||
param.paramno = -1;
|
||||
param.param_type = PDO_PARAM_STR;
|
||||
|
||||
if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
|
||||
"lz|llz!", ¶m.paramno, ¶m.parameter, ¶m.param_type, ¶m.max_value_len,
|
||||
"lz|llz!", ¶m.paramno, ¶m.parameter, ¶m_type, ¶m.max_value_len,
|
||||
¶m.driver_params)) {
|
||||
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|llz!", ¶m.name,
|
||||
¶m.namelen, ¶m.parameter, ¶m.param_type, ¶m.max_value_len,
|
||||
¶m.namelen, ¶m.parameter, ¶m_type, ¶m.max_value_len,
|
||||
¶m.driver_params)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
param.param_type = (int) param_type;
|
||||
|
||||
if (param.paramno > 0) {
|
||||
--param.paramno; /* make it zero-based internally */
|
||||
@@ -2597,26 +2605,28 @@ static zval *row_prop_or_dim_read(zval *object, zval *member, int type TSRMLS_DC
|
||||
|
||||
MAKE_STD_ZVAL(return_value);
|
||||
RETVAL_NULL();
|
||||
|
||||
if (Z_TYPE_P(member) == IS_LONG) {
|
||||
if (Z_LVAL_P(member) >= 0 && Z_LVAL_P(member) < stmt->column_count) {
|
||||
fetch_value(stmt, return_value, Z_LVAL_P(member), NULL TSRMLS_CC);
|
||||
}
|
||||
} else {
|
||||
convert_to_string(member);
|
||||
/* TODO: replace this with a hash of available column names to column
|
||||
* numbers */
|
||||
for (colno = 0; colno < stmt->column_count; colno++) {
|
||||
if (strcmp(stmt->columns[colno].name, Z_STRVAL_P(member)) == 0) {
|
||||
fetch_value(stmt, return_value, colno, NULL TSRMLS_CC);
|
||||
return_value->refcount = 0;
|
||||
return_value->is_ref = 0;
|
||||
return return_value;
|
||||
|
||||
if (stmt) {
|
||||
if (Z_TYPE_P(member) == IS_LONG) {
|
||||
if (Z_LVAL_P(member) >= 0 && Z_LVAL_P(member) < stmt->column_count) {
|
||||
fetch_value(stmt, return_value, Z_LVAL_P(member), NULL TSRMLS_CC);
|
||||
}
|
||||
} else {
|
||||
convert_to_string(member);
|
||||
/* TODO: replace this with a hash of available column names to column
|
||||
* numbers */
|
||||
for (colno = 0; colno < stmt->column_count; colno++) {
|
||||
if (strcmp(stmt->columns[colno].name, Z_STRVAL_P(member)) == 0) {
|
||||
fetch_value(stmt, return_value, colno, NULL TSRMLS_CC);
|
||||
return_value->refcount = 0;
|
||||
return_value->is_ref = 0;
|
||||
return return_value;
|
||||
}
|
||||
}
|
||||
if (strcmp(Z_STRVAL_P(member), "queryString") == 0) {
|
||||
zval_ptr_dtor(&return_value);
|
||||
return std_object_handlers.read_property(object, member, IS_STRING TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
if (strcmp(Z_STRVAL_P(member), "queryString") == 0) {
|
||||
zval_ptr_dtor(&return_value);
|
||||
return std_object_handlers.read_property(object, member, IS_STRING TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2636,16 +2646,18 @@ static int row_prop_or_dim_exists(zval *object, zval *member, int check_empty TS
|
||||
pdo_stmt_t * stmt = (pdo_stmt_t *) zend_object_store_get_object(object TSRMLS_CC);
|
||||
int colno = -1;
|
||||
|
||||
if (Z_TYPE_P(member) == IS_LONG) {
|
||||
return Z_LVAL_P(member) >= 0 && Z_LVAL_P(member) < stmt->column_count;
|
||||
} else {
|
||||
convert_to_string(member);
|
||||
if (stmt) {
|
||||
if (Z_TYPE_P(member) == IS_LONG) {
|
||||
return Z_LVAL_P(member) >= 0 && Z_LVAL_P(member) < stmt->column_count;
|
||||
} else {
|
||||
convert_to_string(member);
|
||||
|
||||
/* TODO: replace this with a hash of available column names to column
|
||||
* numbers */
|
||||
for (colno = 0; colno < stmt->column_count; colno++) {
|
||||
if (strcmp(stmt->columns[colno].name, Z_STRVAL_P(member)) == 0) {
|
||||
return 1;
|
||||
/* TODO: replace this with a hash of available column names to column
|
||||
* numbers */
|
||||
for (colno = 0; colno < stmt->column_count; colno++) {
|
||||
if (strcmp(stmt->columns[colno].name, Z_STRVAL_P(member)) == 0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2663,6 +2675,10 @@ static HashTable *row_get_properties(zval *object TSRMLS_DC)
|
||||
pdo_stmt_t * stmt = (pdo_stmt_t *) zend_object_store_get_object(object TSRMLS_CC);
|
||||
int i;
|
||||
|
||||
if (stmt == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < stmt->column_count; i++) {
|
||||
zval *val;
|
||||
MAKE_STD_ZVAL(val);
|
||||
|
||||
@@ -34,7 +34,7 @@ class TestDerived extends TestBase
|
||||
|
||||
public function __construct(&$row)
|
||||
{
|
||||
echo __METHOD__ . "($row,{$this->id})\n";
|
||||
echo __METHOD__ . "($row)\n";
|
||||
$this->row = $row++;
|
||||
}
|
||||
}
|
||||
@@ -108,9 +108,9 @@ array(3) {
|
||||
string(2) "CC"
|
||||
}
|
||||
}
|
||||
TestDerived::__construct(0,1)
|
||||
TestDerived::__construct(1,2)
|
||||
TestDerived::__construct(2,3)
|
||||
TestDerived::__construct(0)
|
||||
TestDerived::__construct(1)
|
||||
TestDerived::__construct(2)
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(TestDerived)#%d (5) {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Testing PDORow and PDOStatement instances with Reflection
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$instance = new reflectionclass('pdorow');
|
||||
$x = $instance->newInstance();
|
||||
var_dump($x);
|
||||
|
||||
$instance = new reflectionclass('pdostatement');
|
||||
$x = $instance->newInstance();
|
||||
var_dump($x);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
object(PDORow)#%d (0) {
|
||||
}
|
||||
object(PDOStatement)#%d (1) {
|
||||
[%u|b%"queryString"]=>
|
||||
NULL
|
||||
}
|
||||
@@ -38,7 +38,7 @@ zend_function_entry pdo_firebird_functions[] = { /* {{{ */
|
||||
/* {{{ pdo_firebird_deps
|
||||
*/
|
||||
#if ZEND_MODULE_API_NO >= 20050922
|
||||
static const zend_module_dep pdo_firebird_deps[] = {
|
||||
static zend_module_dep pdo_firebird_deps[] = {
|
||||
ZEND_MOD_REQUIRED("pdo")
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
--TEST--
|
||||
Bug #45120 (PDOStatement->execute() returns true then false for same statement)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
|
||||
require dirname(__FILE__) . '/config.inc';
|
||||
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
|
||||
PDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require dirname(__FILE__) . '/config.inc';
|
||||
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
|
||||
$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
|
||||
|
||||
function bug_45120($db) {
|
||||
|
||||
$stmt = $db->prepare("SELECT 1 AS 'one'");
|
||||
if (true !== $stmt->execute())
|
||||
printf("[001] Execute has failed: %s\n", var_export($stmt->errorInfo(), true));
|
||||
|
||||
$res = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
if ($res['one'] != 1)
|
||||
printf("[002] Wrong results: %s\n", var_export($res, true));
|
||||
|
||||
if (true !== $stmt->execute())
|
||||
printf("[003] Execute has failed: %s\n", var_export($stmt->errorInfo(), true));
|
||||
|
||||
$res = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
if ($res['one'] != 1)
|
||||
printf("[004] Wrong results: %s\n", var_export($res, true));
|
||||
|
||||
}
|
||||
|
||||
print "Emulated Prepared Statements\n";
|
||||
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
|
||||
bug_45120($db);
|
||||
|
||||
print "Native Prepared Statements\n";
|
||||
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
|
||||
bug_45120($db);
|
||||
|
||||
print "done!";
|
||||
?>
|
||||
--EXPECT--
|
||||
Emulated Prepared Statements
|
||||
Native Prepared Statements
|
||||
done!
|
||||
@@ -0,0 +1,61 @@
|
||||
--TEST--
|
||||
Bug #50323 (No ability to connect to database named 't;', no chance to escape semicolon)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded');
|
||||
require dirname(__FILE__) . '/config.inc';
|
||||
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
|
||||
PDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
|
||||
$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
|
||||
|
||||
function changeDSN($original, $new_options) {
|
||||
$old_options = array();
|
||||
$dsn = substr($original,
|
||||
strpos($original, ':') + 1,
|
||||
strlen($original));
|
||||
|
||||
// no real parser - any excotic setting can fool us
|
||||
$parts = explode(';', $dsn);
|
||||
foreach ($parts as $k => $v) {
|
||||
$tmp = explode('=', $v);
|
||||
if (count($tmp) == 2)
|
||||
$old_options[$tmp[0]] = $tmp[1];
|
||||
}
|
||||
|
||||
$options = $old_options;
|
||||
foreach ($new_options as $k => $v)
|
||||
$options[$k] = $v;
|
||||
|
||||
$dsn = 'mysql:';
|
||||
foreach ($options as $k => $v)
|
||||
$dsn .= sprintf('%s=%s;', $k, $v);
|
||||
|
||||
$dsn = substr($dsn, 0, strlen($dsn) -1);
|
||||
|
||||
return $dsn;
|
||||
}
|
||||
|
||||
|
||||
if (1 === @$db->exec('CREATE DATABASE `crazy;dbname`')) {
|
||||
$dsn = changeDSN(getenv('PDOTEST_DSN'), array('dbname' => 'crazy;;dbname'));
|
||||
$user = getenv('PDOTEST_USER');
|
||||
$pass = getenv('PDOTEST_PASS');
|
||||
|
||||
new PDO($dsn, $user, $pass);
|
||||
}
|
||||
echo 'done!';
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
|
||||
$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
|
||||
|
||||
@$db->exec('DROP DATABASE IF EXISTS `crazy;dbname`');
|
||||
?>
|
||||
--EXPECTF--
|
||||
done!
|
||||
|
||||
@@ -80,8 +80,8 @@ ZEND_GET_MODULE(pdo_pgsql)
|
||||
*/
|
||||
PHP_MINIT_FUNCTION(pdo_pgsql)
|
||||
{
|
||||
php_pdo_register_driver(&pdo_pgsql_driver);
|
||||
REGISTER_PDO_CLASS_CONST_LONG("PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT", PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT);
|
||||
php_pdo_register_driver(&pdo_pgsql_driver);
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@@ -233,19 +233,18 @@ static int pgsql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len,
|
||||
efree(S->cursor_name);
|
||||
}
|
||||
/* TODO: check how scrollable cursors related to prepared statements */
|
||||
spprintf(&S->cursor_name, 0, "pdo_pgsql_cursor_%08x", (unsigned int) stmt);
|
||||
spprintf(&S->cursor_name, 0, "pdo_crsr_%08x", ++H->stmt_counter);
|
||||
}
|
||||
|
||||
#if HAVE_PQPREPARE
|
||||
|
||||
if (driver_options) {
|
||||
if (pdo_attr_lval(driver_options,
|
||||
PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, 0 TSRMLS_CC) == 1) {
|
||||
emulate = 1;
|
||||
} else if (pdo_attr_lval(driver_options, PDO_ATTR_EMULATE_PREPARES,
|
||||
0 TSRMLS_CC) == 1) {
|
||||
if (pdo_attr_lval(driver_options, PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, H->disable_native_prepares TSRMLS_CC) == 1 ||
|
||||
pdo_attr_lval(driver_options, PDO_ATTR_EMULATE_PREPARES, H->emulate_prepares TSRMLS_CC) == 1) {
|
||||
emulate = 1;
|
||||
}
|
||||
} else {
|
||||
emulate = H->disable_native_prepares || H->emulate_prepares;
|
||||
}
|
||||
|
||||
if (!emulate && PQprotocolVersion(H->server) > 2) {
|
||||
@@ -262,7 +261,7 @@ static int pgsql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len,
|
||||
return 0;
|
||||
}
|
||||
|
||||
spprintf(&S->stmt_name, 0, "pdo_pgsql_stmt_%08x", (unsigned int)stmt);
|
||||
spprintf(&S->stmt_name, 0, "pdo_stmt_%08x", ++H->stmt_counter);
|
||||
/* that's all for now; we'll defer the actual prepare until the first execute call */
|
||||
|
||||
if (nsql) {
|
||||
@@ -646,7 +645,21 @@ static zend_function_entry *pdo_pgsql_get_driver_methods(pdo_dbh_t *dbh, int kin
|
||||
|
||||
static int pdo_pgsql_set_attr(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC)
|
||||
{
|
||||
return 0;
|
||||
pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data;
|
||||
|
||||
switch (attr) {
|
||||
#if HAVE_PQPREPARE
|
||||
case PDO_ATTR_EMULATE_PREPARES:
|
||||
H->emulate_prepares = Z_LVAL_P(val);
|
||||
return 1;
|
||||
case PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT:
|
||||
H->disable_native_prepares = Z_LVAL_P(val);
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
static struct pdo_dbh_methods pgsql_methods = {
|
||||
|
||||
@@ -157,7 +157,7 @@ stmt_retry:
|
||||
* deallocate it and retry ONCE (thies 2005.12.15)
|
||||
*/
|
||||
if (!strcmp(sqlstate, "42P05")) {
|
||||
char buf[100]; /* stmt_name == "pdo_pgsql_cursor_%08x" */
|
||||
char buf[100]; /* stmt_name == "pdo_crsr_%08x" */
|
||||
PGresult *res;
|
||||
snprintf(buf, sizeof(buf), "DEALLOCATE %s", S->stmt_name);
|
||||
res = PQexec(H->server, buf);
|
||||
|
||||
@@ -43,6 +43,14 @@ typedef struct {
|
||||
unsigned _reserved:31;
|
||||
pdo_pgsql_error_info einfo;
|
||||
Oid pgoid;
|
||||
#if HAVE_PQPREPARE
|
||||
/* The following two variables have the same purpose. Unfortunately we need
|
||||
to keep track of two different attributes having the same effect.
|
||||
It might be worth to deprecate the driver specific one soon. */
|
||||
int emulate_prepares;
|
||||
int disable_native_prepares;
|
||||
#endif
|
||||
unsigned int stmt_counter;
|
||||
} pdo_pgsql_db_handle;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
--TEST--
|
||||
Bug #48764 (PDO_pgsql::query always uses implicit prepared statements if v3 proto available)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
|
||||
require dirname(__FILE__) . '/config.inc';
|
||||
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
|
||||
PDOTest::skip();
|
||||
|
||||
$db = PDOTest::factory();
|
||||
|
||||
$client_version = $db->getAttribute(PDO::ATTR_CLIENT_VERSION);
|
||||
$server_version = $db->getAttribute(PDO::ATTR_SERVER_VERSION);
|
||||
|
||||
if (version_compare($server_version, '7.4', '<') || version_compare($client_version, '7.4', '<')) {
|
||||
die('skip');
|
||||
}
|
||||
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
|
||||
$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
echo "Test 1\n";
|
||||
bug($db);
|
||||
|
||||
echo "Test 2\n";
|
||||
bug($db, array(PDO::ATTR_EMULATE_PREPARES => 0));
|
||||
bug($db, array(PDO::ATTR_EMULATE_PREPARES => 1));
|
||||
|
||||
echo "Test 3\n";
|
||||
bug($db, array(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT => 0));
|
||||
bug($db, array(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT => 1));
|
||||
|
||||
echo "Test 4\n";
|
||||
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 1);
|
||||
bug($db);
|
||||
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
|
||||
bug($db);
|
||||
|
||||
echo "Test 5\n";
|
||||
$db->setAttribute(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, 1);
|
||||
bug($db);
|
||||
$db->setAttribute(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, 0);
|
||||
bug($db);
|
||||
|
||||
|
||||
putenv('PDOTEST_ATTR='.serialize(array(
|
||||
PDO::ATTR_EMULATE_PREPARES => 1,
|
||||
)));
|
||||
$db = PDOTest::factory('PDO', false);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
echo "Test 6\n";
|
||||
bug($db);
|
||||
bug($db, array(PDO::ATTR_EMULATE_PREPARES => 0));
|
||||
bug($db, array(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT => 0));
|
||||
|
||||
|
||||
putenv('PDOTEST_ATTR='.serialize(array(
|
||||
PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT => 1,
|
||||
)));
|
||||
|
||||
$db = PDOTest::factory('PDO', false);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
echo "Test 7\n";
|
||||
bug($db);
|
||||
bug($db, array(PDO::ATTR_EMULATE_PREPARES => 0));
|
||||
bug($db, array(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT => 0));
|
||||
|
||||
|
||||
putenv('PDOTEST_ATTR='.serialize(array(
|
||||
PDO::ATTR_EMULATE_PREPARES => 1,
|
||||
PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT => 1,
|
||||
)));
|
||||
|
||||
$db = PDOTest::factory('PDO', false);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
echo "Test 8\n";
|
||||
bug($db);
|
||||
bug($db, array(PDO::ATTR_EMULATE_PREPARES => 0));
|
||||
bug($db, array(PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT => 0));
|
||||
bug($db, array(
|
||||
PDO::ATTR_EMULATE_PREPARES => 0,
|
||||
PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT => 0,
|
||||
));
|
||||
|
||||
|
||||
putenv('PDOTEST_ATTR');
|
||||
|
||||
|
||||
function bug($db, $options = array()) {
|
||||
try {
|
||||
$stmt = $db->prepare("SELECT ?", $options);
|
||||
$stmt->execute(array(1));
|
||||
echo "OK\n";
|
||||
} catch (PDOException $e) {
|
||||
// Indetermined data type when using native prepared statements
|
||||
echo $e->getCode()."\n";
|
||||
}
|
||||
}
|
||||
|
||||
--EXPECT--
|
||||
Test 1
|
||||
42P18
|
||||
Test 2
|
||||
42P18
|
||||
OK
|
||||
Test 3
|
||||
42P18
|
||||
OK
|
||||
Test 4
|
||||
OK
|
||||
42P18
|
||||
Test 5
|
||||
OK
|
||||
42P18
|
||||
Test 6
|
||||
OK
|
||||
42P18
|
||||
OK
|
||||
Test 7
|
||||
OK
|
||||
OK
|
||||
42P18
|
||||
Test 8
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
42P18
|
||||
@@ -0,0 +1,35 @@
|
||||
--TEST--
|
||||
Bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded');
|
||||
require dirname(__FILE__) . '/config.inc';
|
||||
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
|
||||
PDOTest::skip();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
|
||||
$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
$db->exec("CREATE TABLE test (a int PRIMARY KEY)");
|
||||
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
try {
|
||||
$db->beginTransaction();
|
||||
$stmt = $db->prepare("INSERT INTO test (a) VALUES (?)");
|
||||
var_dump($stmt->execute(array(1)));
|
||||
$db->commit();
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage()."\n";
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
SQLSTATE[23505]: %s"test_pkey"
|
||||
SQLSTATE[23505]: %s"test_pkey"
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
--TEST--
|
||||
Bug #49521 (PDO fetchObject sets values before calling constructor)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('pdo_sqlite')) die ("skip Need PDO_SQlite support");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Book {
|
||||
public $title = 'test';
|
||||
public $author;
|
||||
|
||||
public function __construct($x) {
|
||||
$this->title = '';
|
||||
echo __METHOD__,"\n";
|
||||
}
|
||||
public function __set($a, $b) {
|
||||
echo __METHOD__,"\n";
|
||||
var_dump($a);
|
||||
}
|
||||
}
|
||||
|
||||
$pdo = new PDO('sqlite::memory:');
|
||||
$pdo->exec('CREATE TABLE book(title,author)');
|
||||
$pdo->exec('INSERT INTO book VALUES ("PHP","Rasmus")');
|
||||
$statement = $pdo->prepare('SELECT * FROM book WHERE title="PHP"');
|
||||
$statement->execute();
|
||||
var_dump($statement->fetchObject('Book', array(1)));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Book::__construct
|
||||
object(Book)#%d (2) {
|
||||
[%u|b%"title"]=>
|
||||
string(3) "PHP"
|
||||
[%u|b%"author"]=>
|
||||
string(6) "Rasmus"
|
||||
}
|
||||
+17
-11
@@ -363,7 +363,7 @@ static void _php_pgsql_notice_handler(void *resource_id, const char *message)
|
||||
if (PGG(log_notices)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s", notice->message);
|
||||
}
|
||||
zend_hash_index_update(&PGG(notices), (int)resource_id, (void **)¬ice, sizeof(php_pgsql_notice *), NULL);
|
||||
zend_hash_index_update(&PGG(notices), (ulong)resource_id, (void **)¬ice, sizeof(php_pgsql_notice *), NULL);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -761,13 +761,14 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||
*/
|
||||
if (!(connect_type & PGSQL_CONNECT_FORCE_NEW)
|
||||
&& zend_hash_find(&EG(regular_list),str.c,str.len+1,(void **) &index_ptr)==SUCCESS) {
|
||||
int type,link;
|
||||
int type;
|
||||
ulong link;
|
||||
void *ptr;
|
||||
|
||||
if (Z_TYPE_P(index_ptr) != le_index_ptr) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
link = (int) index_ptr->ptr;
|
||||
link = (ulong) index_ptr->ptr;
|
||||
ptr = zend_list_find(link,&type); /* check if the link is still there */
|
||||
if (ptr && (type==le_link || type==le_plink)) {
|
||||
Z_LVAL_P(return_value) = link;
|
||||
@@ -1754,14 +1755,15 @@ PHP_FUNCTION(pg_field_table)
|
||||
|
||||
|
||||
if (return_oid) {
|
||||
#if UINT_MAX > LONG_MAX /* Oid is unsigned int, we don't need this code, where LONG is wider */
|
||||
if (oid > LONG_MAX) {
|
||||
smart_str oidstr = {0};
|
||||
smart_str_append_unsigned(&oidstr, oid);
|
||||
smart_str_0(&oidstr);
|
||||
RETURN_STRINGL(oidstr.c, oidstr.len, 0);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
RETURN_LONG((long)oid);
|
||||
}
|
||||
}
|
||||
|
||||
/* try to lookup the table name in the resource list */
|
||||
@@ -1859,7 +1861,7 @@ static void php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_typ
|
||||
case PHP_PG_FIELD_TYPE_OID:
|
||||
|
||||
oid = PQftype(pgsql_result, Z_LVAL_PP(field));
|
||||
|
||||
#if UINT_MAX > LONG_MAX
|
||||
if (oid > LONG_MAX) {
|
||||
smart_str s = {0};
|
||||
smart_str_append_unsigned(&s, oid);
|
||||
@@ -1867,8 +1869,8 @@ static void php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_typ
|
||||
Z_STRVAL_P(return_value) = s.c;
|
||||
Z_STRLEN_P(return_value) = s.len;
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
}
|
||||
else
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
Z_LVAL_P(return_value) = (long)oid;
|
||||
Z_TYPE_P(return_value) = IS_LONG;
|
||||
@@ -3339,7 +3341,11 @@ PHP_FUNCTION(pg_copy_to)
|
||||
pg_null_as = safe_estrdup("\\\\N");
|
||||
}
|
||||
|
||||
spprintf(&query, 0, "COPY \"%s\" TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as);
|
||||
if (memchr(table_name, '.', table_name_len)) {
|
||||
spprintf(&query, 0, "COPY %s TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as);
|
||||
} else {
|
||||
spprintf(&query, 0, "COPY \"%s\" TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as);
|
||||
}
|
||||
|
||||
while ((pgsql_result = PQgetResult(pgsql))) {
|
||||
PQclear(pgsql_result);
|
||||
@@ -5767,8 +5773,8 @@ PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array TS
|
||||
{
|
||||
zval *row;
|
||||
char *field_name, *element, *data;
|
||||
size_t num_fields, element_len, data_len;
|
||||
int pg_numrows, pg_row;
|
||||
size_t num_fields, element_len;
|
||||
int data_len, pg_numrows, pg_row;
|
||||
uint i;
|
||||
assert(Z_TYPE_P(ret_array) == IS_ARRAY);
|
||||
|
||||
|
||||
+2
-1
@@ -679,7 +679,8 @@ PHP_FUNCTION(posix_mkfifo)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (PG(safe_mode) && (!php_checkuid(path, NULL, CHECKUID_ALLOW_ONLY_DIR))) {
|
||||
if (php_check_open_basedir_ex(path, 0 TSRMLS_CC) ||
|
||||
(PG(safe_mode) && (!php_checkuid(path, NULL, CHECKUID_ALLOW_ONLY_DIR)))) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ Francesco Fullone ff@ideato.it
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
|
||||
if(posix_getuid()==0) print "skip - Cannot run test as root.";
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -7,6 +7,7 @@ Francesco Fullone ff@ideato.it
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
|
||||
if(!extension_loaded("pcntl")) print "skip - PCNTL extension required";
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -3,6 +3,7 @@ Test function posix_seteuid() by substituting argument 1 with boolean values.
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
|
||||
if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
|
||||
?>
|
||||
--CREDITS--
|
||||
Marco Fabbri mrfabbri@gmail.com
|
||||
|
||||
@@ -3,6 +3,7 @@ Test function posix_seteuid() by substituting argument 1 with emptyUnsetUndefNul
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
|
||||
if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
|
||||
?>
|
||||
--CREDITS--
|
||||
Marco Fabbri mrfabbri@gmail.com
|
||||
|
||||
@@ -3,6 +3,7 @@ Test function posix_seteuid() by substituting argument 1 with float values.
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
|
||||
if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
|
||||
?>
|
||||
--CREDITS--
|
||||
Marco Fabbri mrfabbri@gmail.com
|
||||
|
||||
@@ -3,6 +3,7 @@ Test function posix_seteuid() by substituting argument 1 with int values.
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
|
||||
if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
|
||||
?>
|
||||
--CREDITS--
|
||||
Marco Fabbri mrfabbri@gmail.com
|
||||
|
||||
Loaded 100 of 222 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user