Compare commits

..
Author SHA1 Message Date
Ilia Alshanetsky 26e4593134 5.2.11RC2 2009-09-03 12:15:36 +00:00
232 changed files with 4878 additions and 9457 deletions

No files matched your search

+1 -1
View File
@@ -206,7 +206,7 @@ STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_pgsql
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
+9 -4
View File
@@ -82,21 +82,26 @@ PHP_TEST_SHARED_EXTENSIONS = ` \
test: all
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
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`; \
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=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
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`; \
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=$(PHP_EXECUTABLE) \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(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); \
$(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); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
+55 -190
View File
@@ -1,192 +1,65 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 Dec 2009, PHP 5.2.12RC4
- 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)
03 Sep 2009, PHP 5.2.11RC2
- Added missing sanity checks around exif processing (Ilia)
- Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)
- 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 #50266 (conflicting types for llabs). (Jani)
- 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 #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
- Fixed bug #49472 (Constants defined in Interfaces can be overridden).
(Felipe)
- 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)
27 Nov 2009, PHP 5.2.12RC3
- Fixed break in the build chain introduced in 5.2.12RC2 (Jani)
26 Nov 2009, PHP 5.2.12RC2
- 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 error_log() to be binary safe when using message_type 3. (Jani)
- 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 #50255 (isset() and empty() silently casts array to object).
(Felipe)
- Fixed bug #50219 (soap call Segmentation fault on a redirected url).
(Pierrick)
- 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 #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses
containing = or ?). (Pierrick)
- Fixed bug #49677 (ini parser crashes with apache2 and using ${something}
ini variables). (Jani)
- Fixed bug #49521 (PDO fetchObject sets values before calling constructor).
(Pierrick)
12 Nov 2009, PHP 5.2.12RC1
- Updated timezone database to version 2009.18 (2009r). (Derick)
- 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)
- 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)
- 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 #49921 (Curl post upload functions changed). (Ilia)
- Fixed bug #49972 (AppendIterator undefined function crash). (Johannes)
- 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 #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 #49517 (cURL's CURLOPT_FILE prevents file from being deleted after
fclose()). (Ilia)
- Fixed bug #49354 (mb_strcut() cuts wrong length when offset is in the middle
of a multibyte character). (Moriyoshi)
- Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrongly converted).
(Moriyoshi)
- Fixed bug #49332 (Build error with Snow Leopard). (Scott)
- Fixed bug #49244 (Floating point NaN cause garbage characters). (Sjoerd)
- 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)
17 Sep 2009, PHP 5.2.11
- Fixed certificate validation inside php_openssl_apply_verification_policy.
(Ryan Sleevi, Ilia)
- Updated timezone database to version 2009.13 (2009m) (Derick)
- 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 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 leak on error in popen/exec (and related functions on Windows. (Pierre)
- 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).
- 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 #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 #49372 (segfault in php_curl_option_curl). (Pierre)
- 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 #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 #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)
@@ -195,9 +68,6 @@ PHP NEWS
- Fixed bug #48718 (FILTER_VALIDATE_EMAIL does not allow numbers in domain
components). (Ilia)
- 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)
@@ -205,57 +75,54 @@ 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 #28038 (Sent incorrect RCPT TO commands to SMTP server) (Garrett)
- Fixed bug #49572 (use of C++ style comments causes build failure).
(Sriram Natarajan)
- 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)
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)
@@ -546,9 +413,6 @@ PHP NEWS
either disable or change the compile time ini scan directory (FR #45114).
(Jani)
- Reverted fix for bug #44197 due to behaviour change in minor version.
(Felipe)
- Fixed missing initialization of BG(page_uid) and BG(page_gid),
reported by Maksymilian Arciemowicz. (Stas)
- Fixed memory leak inside sqlite_create_aggregate(). (Felipe)
@@ -594,6 +458,8 @@ PHP NEWS
attribute.(Scott)
- Fixed a crash on invalid method in ReflectionParameter constructor.
(Christian Seiler)
- Reverted fix for bug #44197 due to behaviour change in minor version.
(Felipe)
- Fixed bug #46732 (mktime.year description is wrong). (Derick)
- Fixed bug #46696 (cURL fails in upload files with specified content-type).
@@ -841,8 +707,6 @@ PHP NEWS
01 May 2008, PHP 5.2.6
- Upgraded PCRE to version 7.6 (Nuno)
- Fixed two possible crashes inside posix extension (Tony)
- Fixed incorrect heredoc handling when label is used within the block.
(Matt)
@@ -862,6 +726,7 @@ PHP NEWS
- Fixed segfault in filter extension when using callbacks. (Arnar Mar Sig,
Felipe)
- Fixed faulty fix for bug #40189 (endless loop in zlib.inflate stream filter). (Greg)
- Upgraded PCRE to version 7.6 (Nuno)
- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
- Fixed bug #44720 (Prevent crash within session_register()). (Scott)
+2
View File
@@ -8,4 +8,6 @@ $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
-27
View File
@@ -1,27 +0,0 @@
--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
-19
View File
@@ -1,19 +0,0 @@
--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
-33
View File
@@ -1,33 +0,0 @@
--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)
-30
View File
@@ -1,30 +0,0 @@
--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)
+2 -2
View File
@@ -16,5 +16,5 @@ class test implements test1, test2 {
echo "Done\n";
?>
--EXPECTF--
Fatal error: Cannot inherit previously-inherited or override constant FOO from interface test2 in %s on line %d
--EXPECTF--
Fatal error: Cannot inherit previously-inherited constant FOO from interface test2 in %s on line %d
+10 -10
View File
@@ -901,21 +901,21 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
zend_hash_get_current_key_ex(&class_type->default_static_members, &str_index, &str_length, &num_index, 0, &pos);
if ((*p)->is_ref &&
class_type->parent &&
zend_hash_find(&class_type->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS &&
*p == *q &&
zend_hash_find(CE_STATIC_MEMBERS(class_type->parent), str_index, str_length, (void**)&q) == SUCCESS) {
class_type->parent &&
zend_hash_find(&class_type->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS &&
*p == *q &&
zend_hash_find(CE_STATIC_MEMBERS(class_type->parent), str_index, str_length, (void**)&q) == SUCCESS) {
(*q)->refcount++;
(*q)->is_ref = 1;
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)q, sizeof(zval*), NULL);
} else {
zval *r;
zval *q;
ALLOC_ZVAL(r);
*r = **p;
INIT_PZVAL(r);
zval_copy_ctor(r);
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)&r, sizeof(zval*), NULL);
ALLOC_ZVAL(q);
*q = **p;
INIT_PZVAL(q);
zval_copy_ctor(q);
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)&q, sizeof(zval*), NULL);
}
zend_hash_move_forward_ex(&class_type->default_static_members, &pos);
}
+4 -21
View File
@@ -2333,28 +2333,20 @@ 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 or override constant %s from interface %s", hash_key->arKey, iface->name);
if (*old_constant != *parent_constant) {
zend_error(E_COMPILE_ERROR, "Cannot inherit previously-inherited 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)
{
@@ -2374,10 +2366,7 @@ ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry
}
}
}
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 (!ignore) {
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));
@@ -3114,12 +3103,6 @@ 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;
}
}
+1 -2
View File
@@ -1132,8 +1132,7 @@ 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)) &&
(type == BP_VAR_R || type == BP_VAR_IS)) {
if (Z_LVAL_P(dim) < 0 || Z_STRLEN_P(container) <= Z_LVAL_P(dim)) {
zend_error(E_NOTICE, "Uninitialized string offset: %ld", Z_LVAL_P(dim));
}
container = *container_ptr;
+2 -2
View File
@@ -921,7 +921,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
for (i=0; i<fci->param_count; i++) {
zval *param;
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION
if(EX(function_state).function->type == ZEND_INTERNAL_FUNCTION
&& !ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
&& PZVAL_IS_REF(*fci->params[i])) {
SEPARATE_ZVAL(fci->params[i]);
@@ -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
View File
@@ -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 ? object->ce->destructor : NULL;
zend_function *destructor = object->ce->destructor;
if (destructor) {
zval *obj;
-6
View File
@@ -1202,12 +1202,6 @@ 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);
+1 -2
View File
@@ -939,7 +939,6 @@ 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);
/*
@@ -3532,7 +3531,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
+12 -16
View File
@@ -1531,7 +1531,6 @@ 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);
/*
@@ -4112,7 +4111,6 @@ 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);
/*
@@ -7168,7 +7166,6 @@ 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);
/*
@@ -9750,7 +9747,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -11283,7 +11280,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -12864,7 +12861,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -14890,7 +14887,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -16009,7 +16006,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -17002,7 +16999,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -17995,7 +17992,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -19256,7 +19253,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -19603,7 +19600,6 @@ 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);
/*
@@ -22018,7 +22014,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -23543,7 +23539,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -25115,7 +25111,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
@@ -27131,7 +27127,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 && !prop_dim) {
if (Z_TYPE_PP(container) == IS_ARRAY) {
HashTable *ht;
int isset = 0;
+6 -6
View File
@@ -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(_cv_have_broken_glibc_fopen_append,[
AC_CACHE_VAL(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;
}
],
[_cv_have_broken_glibc_fopen_append=no],
[_cv_have_broken_glibc_fopen_append=yes ],
[have_broken_glibc_fopen_append=no],
[have_broken_glibc_fopen_append=yes ],
AC_TRY_COMPILE([
#include <features.h>
],[
@@ -1723,11 +1723,11 @@ AC_TRY_COMPILE([
choke me
#endif
],
[_cv_have_broken_glibc_fopen_append=yes],
[_cv_have_broken_glibc_fopen_append=no ])
[have_broken_glibc_fopen_append=yes],
[have_broken_glibc_fopen_append=no ])
)])
if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then
if test "$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
+793 -899
View File
File diff suppressed because it is too large. Load diff
+20 -80
View File
@@ -1,10 +1,9 @@
#! /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, 2006, 2007, 2008
# Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2008-01-23'
timestamp='2005-08-03'
# 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
@@ -56,8 +55,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, 2006, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
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."
@@ -107,7 +106,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 "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ tmp=`(umask 077 && mktemp -d -q "$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 ; } ;
@@ -161,7 +160,6 @@ 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
@@ -208,11 +206,8 @@ 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 powerpc-unknown-mirbsd${UNAME_RELEASE}
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -330,7 +325,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.*:* | i86xen:SunOS:5.*:*)
i86pc:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
@@ -532,7 +527,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[456])
*:AIX:*:[45])
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
@@ -769,19 +764,12 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
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
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
*:MINGW*:*)
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
@@ -791,18 +779,9 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
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 ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
@@ -836,16 +815,6 @@ 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:*:*)
@@ -882,11 +851,7 @@ EOF
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
@@ -905,11 +870,7 @@ EOF
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
@@ -958,15 +919,9 @@ 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
@@ -1009,7 +964,7 @@ EOF
LIBC=gnulibc1
# endif
#else
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
#ifdef __INTEL_COMPILER
LIBC=gnu
#else
LIBC=gnuaout
@@ -1019,11 +974,7 @@ EOF
LIBC=dietlibc
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1225,15 +1176,6 @@ 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 ;;
@@ -1243,6 +1185,7 @@ 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}
@@ -1321,9 +1264,6 @@ 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
@@ -1484,9 +1424,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://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
and
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
Vendored
+37 -116
View File
@@ -1,10 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2008-01-16'
timestamp='2005-07-08'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -72,8 +71,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, 2006, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
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."
@@ -120,9 +119,8 @@ 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-newlib* | 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-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/'`
;;
@@ -173,10 +171,6 @@ 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/'`
@@ -193,10 +187,6 @@ 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/'`
@@ -241,16 +231,15 @@ 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 | avr32 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fido | fr30 | frv \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -268,27 +257,28 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| mt \
| ms1 \
| msp430 \
| nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| x86 | 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
@@ -296,9 +286,6 @@ 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
@@ -318,18 +305,18 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| avr-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32c-* | m32r-* | m32rle-* \
| m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -349,33 +336,30 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| ms1-* \
| 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-* | sheb-* | shbe-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
m32c-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -447,14 +431,6 @@ 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
@@ -487,8 +463,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
cr16)
basic_machine=cr16-unknown
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos)
@@ -680,14 +656,6 @@ 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
;;
@@ -703,10 +671,6 @@ case $basic_machine in
basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -732,9 +696,6 @@ 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
@@ -833,14 +794,6 @@ 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
;;
@@ -850,12 +803,6 @@ 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
;;
@@ -912,10 +859,6 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -942,10 +885,6 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -957,9 +896,6 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
@@ -1049,10 +985,6 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -1169,7 +1101,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 | sparcv9v)
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1242,23 +1174,21 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -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-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -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* | -rdos* | -toppers* | -drops*)
| -skyos* | -haiku*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1410,12 +1340,6 @@ else
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
@@ -1425,9 +1349,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
@@ -1453,9 +1377,6 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
+40 -37
View File
@@ -41,8 +41,8 @@ AC_CONFIG_HEADER(main/php_config.h)
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=2
PHP_RELEASE_VERSION=12
PHP_EXTRA_VERSION="RC4"
PHP_RELEASE_VERSION=11
PHP_EXTRA_VERSION="RC2"
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,6 +122,21 @@ 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 -------------------------------------------------------------------------
@@ -177,7 +192,6 @@ case $host_cpu in
if test "$SUNCC" = "yes"; then
CFLAGS="$CFLAGS -xmemalign=8s"
fi
;;
esac
case $host_alias in
@@ -197,14 +211,7 @@ case $host_alias in
CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
fi
fi
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
AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
php_multiple_shlib_versions_ok=yes
;;
*beos*)
@@ -359,6 +366,7 @@ dnl in -lc, -lbind and -lresolv
PHP_CHECK_FUNC(inet_aton, resolv, bind)
PHP_CHECK_FUNC(dn_skipname, resolv, bind)
dnl Then headers.
dnl -------------------------------------------------------------------------
@@ -378,7 +386,6 @@ sys/time.h \
netinet/in.h \
alloca.h \
arpa/inet.h \
arpa/nameser_compat.h \
arpa/nameser.h \
assert.h \
crypt.h \
@@ -587,13 +594,11 @@ 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,
@@ -731,6 +736,15 @@ 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,
@@ -745,17 +759,8 @@ 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 -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
CFLAGS="$CFLAGS -O0"
CXXFLAGS="$CXXFLAGS -O0"
fi
else
PHP_DEBUG=0
@@ -960,7 +965,6 @@ 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().
@@ -1200,14 +1204,12 @@ 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)
@@ -1316,14 +1318,6 @@ 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], [], [
@@ -1347,6 +1341,15 @@ 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
+1 -1
View File
@@ -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, CP_THREAD_ACP TSRMLS_CC);
typelib = php_com_load_typelib(typelibname, obj->code_page TSRMLS_CC);
}
if (!gotguid && dispname && typelib) {
+5 -31
View File
@@ -1228,22 +1228,10 @@ 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;
@@ -1373,8 +1361,7 @@ 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 ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&
((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) {
if (((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;
@@ -1469,10 +1456,9 @@ 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] == '+') {
zval_add_ref(zvalue);
zend_list_addref(Z_LVAL_PP(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;
@@ -1481,10 +1467,9 @@ 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] == '+') {
zval_add_ref(zvalue);
zend_list_addref(Z_LVAL_PP(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;
@@ -1492,10 +1477,9 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
}
break;
case CURLOPT_INFILE:
zval_add_ref(zvalue);
zend_list_addref(Z_LVAL_PP(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] == '+') {
@@ -1625,7 +1609,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 + sizeof(";filename=") - 1 : postval,
CURLFORM_FILENAME, filename ? filename : postval,
CURLFORM_CONTENTTYPE, type ? type + sizeof(";type=") - 1 : "application/octet-stream",
CURLFORM_FILE, postval,
CURLFORM_END);
@@ -2144,16 +2128,6 @@ 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);
-2
View File
@@ -86,7 +86,6 @@ typedef struct {
smart_str buf;
int method;
int type;
zval *stream;
} php_curl_write;
typedef struct {
@@ -95,7 +94,6 @@ typedef struct {
FILE *fp;
long fd;
int method;
zval *stream;
} php_curl_read;
typedef struct {
-2
View File
@@ -16,8 +16,6 @@ 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"
+800 -768
View File
File diff suppressed because it is too large. Load diff
+9 -18
View File
@@ -30,14 +30,16 @@
#include "lib/timelib.h"
#include <time.h>
#ifndef HAVE_LLABS
# ifdef PHP_WIN32
#ifdef PHP_WIN32
static __inline __int64 llabs( __int64 i ) { return i >= 0? i: -i; }
# elif defined(__GNUC__) && __GNUC__ < 3
#endif
#if defined(__GNUC__) && __GNUC__ < 3
static __inline __int64_t llabs( __int64_t i ) { return i >= 0 ? i : -i; }
# elif defined(NETWARE) && defined(__MWERKS__)
#endif
#if defined(NETWARE) && defined(__MWERKS__)
static __inline long long llabs( long long i ) { return i >= 0 ? i : -i; }
# endif
#endif
/* {{{ arginfo */
@@ -386,7 +388,6 @@ PHP_RSHUTDOWN_FUNCTION(date)
FREE_HASHTABLE(DATEG(tzcache));
DATEG(tzcache) = NULL;
}
return SUCCESS;
}
/* }}} */
@@ -595,17 +596,7 @@ static char* guess_timezone(const timelib_tzdb *tzdb TSRMLS_DC)
return env;
}
/* Check config setting for default timezone */
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)) {
if (DATEG(default_timezone) && (strlen(DATEG(default_timezone)) > 0) && timelib_timezone_id_is_valid(DATEG(default_timezone), tzdb)) {
return DATEG(default_timezone);
}
#if HAVE_TM_ZONE
@@ -2465,7 +2456,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, 1, &h_rise, &h_set, &rise, &set, &transit);
rs = timelib_astro_rise_set_altitude(t, longitude, latitude, altitude, altitude > -1 ? 1 : 0, &h_rise, &h_set, &rise, &set, &transit);
timelib_time_dtor(t);
if (rs != 0) {
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -113,13 +113,13 @@ bool(false)
bool(false)
--int 12345--
string(5) "09:51"
float(9.855%d)
int(1218169278)
string(5) "09:52"
float(9.882%d)
int(1218169377)
--int -12345--
string(5) "09:54"
float(9.9097820911118)
float(9.909%d)
int(1218169475)
--empty array--
+3 -3
View File
@@ -113,9 +113,9 @@ bool(false)
bool(false)
--int 12345--
string(5) "19:20"
float(19.340%d)
int(1218203424)
string(5) "19:19"
float(19.319%d)
int(1218203349)
--int -12345--
bool(false)
File diff suppressed because it is too large. Load diff
-12
View File
@@ -1252,18 +1252,6 @@ 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);
}
}
+3 -1
View File
@@ -200,6 +200,7 @@ 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);
@@ -215,8 +216,9 @@ 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);
ZVAL_STRINGL(*retval, buff->buffer->content, buff->buffer->use, 1);
strintsubset = xmlStrndup(buff->buffer->content, buff->buffer->use);
(void)xmlOutputBufferClose(buff);
ZVAL_STRING(*retval, (char *) strintsubset, 1);
return SUCCESS;
}
}
+2 -2
View File
@@ -1778,7 +1778,7 @@ PHP_FUNCTION(dom_node_get_feature)
/* }}} end dom_node_get_feature */
/* {{{ proto mixed dom_node_set_user_data(string key, mixed data, userdatahandler handler);
/* {{{ proto DomUserData dom_node_set_user_data(string key, DomUserData 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 mixed dom_node_get_user_data(string key);
/* {{{ proto DomUserData 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
*/
@@ -3,14 +3,9 @@ Read empty $value.
--CREDIT--
Jason Bouffard <jbouffard1@yahoo.com>
# TestFest Atlanta 2009-05-14
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$attr = new DOMAttr('category');
print $attr->value."\n";
?>
===DONE===
--EXPECTF--
===DONE===
@@ -3,8 +3,6 @@ DOMCharacterData::appendData basic functionality test
--CREDITS--
Mike Sullivan <mike@regexia.com>
#TestFest 2008 (London)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
@@ -28,13 +26,10 @@ echo "CDATA Content: " . $cdatanode->data . "\n";
echo "\n" . $document->saveXML();
?>
===DONE===
--EXPECT--
CDATA Length (one append): 4
CDATA Length (two appends): 8
CDATA Content: data><&"
<?xml version="1.0"?>
<root><cdata><![CDATA[data><&"]]></cdata></root>
===DONE===
<root><cdata><![CDATA[data><&"]]></cdata></root>
@@ -3,15 +3,10 @@ Invalid State Error when getting length on DOMCharacterData out of content.
--CREDIT--
Jason Bouffard <jbouffard1@yahoo.com>
# TestFest Atlanta 2009-05-14
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$character_data = new DOMCharacterData();
print $character_data->length;
?>
===DONE===
--EXPECTF--
Warning: main(): Invalid State Error in %s
===DONE===
Warning: main(): Invalid State Error in %s
+1 -6
View File
@@ -3,8 +3,6 @@ DOMText::appendData basic functionality test
--CREDITS--
Mike Sullivan <mike@regexia.com>
#TestFest 2008 (London)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
@@ -28,13 +26,10 @@ echo "Text Content: " . $textnode->data . "\n";
echo "\n" . $document->saveXML();
?>
===DONE===
--EXPECT--
Text Length (one append): 4
Text Length (two appends): 8
Text Content: data><&"
<?xml version="1.0"?>
<root><text>data&gt;&lt;&amp;"</text></root>
===DONE===
<root><text>data&gt;&lt;&amp;"</text></root>
+1 -6
View File
@@ -1,7 +1,5 @@
--TEST--
Bug #42082 (NodeList length zero should be empty)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$doc = new DOMDocument();
@@ -16,7 +14,6 @@ $doc->loadXML("<element></element>");
var_dump($doc->firstChild->nodeValue, empty($doc->firstChild->nodeValue), isset($doc->firstChild->nodeValue));
var_dump(empty($doc->nodeType), empty($doc->firstChild->nodeType))
?>
===DONE===
--EXPECTF--
object(DOMNodeList)#%d (0) {
}
@@ -27,6 +24,4 @@ string(0) ""
bool(true)
bool(true)
bool(false)
bool(false)
===DONE===
bool(false)
-5
View File
@@ -1,7 +1,5 @@
--TEST--
Bug #43364 (recursive xincludes don't remove internal xml nodes properly)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
function loopElements($nodes)
@@ -38,8 +36,5 @@ $count = loopElements(array($doc->documentElement));
var_dump($count);
?>
===DONE===
--EXPECT--
int(13)
===DONE===
-25
View File
@@ -1,25 +0,0 @@
--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"/>
@@ -2,15 +2,10 @@
DomDocument::CreateComment() - Incorrect Parameters
--CREDITS--
Clint Priest @ PhpTek09
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$x = new DomDocument();
$x->createComment();
?>
===DONE===
--EXPECTF--
Warning: DOMDocument::createComment() expects exactly 1 parameter, 0 given in %s
===DONE===
Warning: DOMDocument::createComment() expects exactly 1 parameter, 0 given in %s
@@ -2,17 +2,12 @@
DomDocument::CreateEntityReference() - Creates an entity reference with the appropriate name
--CREDITS--
Clint Priest @ PhpTek09
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$objDoc = new DomDocument();
$objRef = $objDoc->createEntityReference('Test');
echo $objRef->nodeName . "\n";
echo $objRef->nodeName;
?>
===DONE===
--EXPECT--
Test
===DONE===
Test
@@ -2,16 +2,11 @@
DomDocument::CreateEntityReference() - Empty Arguments
--CREDITS--
Clint Priest @ PhpTek09
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
$objDoc = new DomDocument();
$objRef = $objDoc->createEntityReference();
?>
===DONE===
--EXPECTF--
Warning: DOMDocument::createEntityReference() expects exactly 1 parameter, 0 given in %s
===DONE===
Warning: DOMDocument::createEntityReference() expects exactly 1 parameter, 0 given in %s
+4
View File
@@ -3881,7 +3881,11 @@ 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);*/
}
-13
View File
@@ -316,19 +316,6 @@ static void php_zval_filter(zval **value, long filter, long flags, zval *options
if (copy) {
SEPARATE_ZVAL(value);
}
/* #49274, fatal error with object without a toString method
Fails nicely instead of getting a recovarable fatal error. */
if (Z_TYPE_PP(value) == IS_OBJECT) {
zend_class_entry *ce;
ce = Z_OBJCE_PP(value);
if (!ce->__tostring) {
ZVAL_FALSE(*value);
return;
}
}
/* Here be strings */
convert_to_string(*value);
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -275,7 +275,7 @@ void php_filter_unsafe_raw(PHP_INPUT_FILTER_PARAM_DECL)
void php_filter_email(PHP_INPUT_FILTER_PARAM_DECL)
{
/* Check section 6 of rfc 822 http://www.faqs.org/rfcs/rfc822.html */
const unsigned char allowed_list[] = LOWALPHA HIALPHA DIGIT "!#$%&'*+-=?^_`{|}~@.[]";
const unsigned char allowed_list[] = LOWALPHA HIALPHA DIGIT "!#$%&'*+-/=?^_`{|}~@.[]";
filter_map map;
filter_map_init(&map);
+1 -1
View File
@@ -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&#60;&#62;() O&#39;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 httpa.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
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
+4
View File
@@ -12,8 +12,12 @@ 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)
-10
View File
@@ -1,10 +0,0 @@
--TEST--
#49274, fatal error when an object does not implement toString
--SKIPIF--
<?php if (!extension_loaded("filter")) die("skip"); ?>
--FILE--
<?php
var_dump(filter_var(new stdClass, FILTER_VALIDATE_EMAIL));
?>
--EXPECTF--
bool(false)
-23
View File
@@ -1,23 +0,0 @@
--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"
+6 -6
View File
@@ -147,7 +147,7 @@ ftp_open(const char *host, short port, long timeout_sec TSRMLS_DC)
size = sizeof(ftp->localaddr);
memset(&ftp->localaddr, 0, size);
if (getsockname(ftp->fd, (struct sockaddr*) &ftp->localaddr, &size) != 0) {
if (getsockname(ftp->fd, (struct sockaddr*) &ftp->localaddr, &size) == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "getsockname failed: %s (%d)", strerror(errno), errno);
goto bail;
}
@@ -1387,7 +1387,7 @@ ftp_getdata(ftpbuf_t *ftp TSRMLS_DC)
sa = (struct sockaddr *) &ftp->localaddr;
/* bind/listen */
if ((fd = socket(sa->sa_family, SOCK_STREAM, 0)) == SOCK_ERR) {
if ((fd = socket(sa->sa_family, SOCK_STREAM, 0)) == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "socket() failed: %s (%d)", strerror(errno), errno);
goto bail;
}
@@ -1420,17 +1420,17 @@ ftp_getdata(ftpbuf_t *ftp TSRMLS_DC)
php_any_addr(sa->sa_family, &addr, 0);
size = php_sockaddr_size(&addr);
if (bind(fd, (struct sockaddr*) &addr, size) != 0) {
if (bind(fd, (struct sockaddr*) &addr, size) == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "bind() failed: %s (%d)", strerror(errno), errno);
goto bail;
}
if (getsockname(fd, (struct sockaddr*) &addr, &size) != 0) {
if (getsockname(fd, (struct sockaddr*) &addr, &size) == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "getsockname() failed: %s (%d)", strerror(errno), errno);
goto bail;
}
if (listen(fd, 5) != 0) {
if (listen(fd, 5) == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "listen() failed: %s (%d)", strerror(errno), errno);
goto bail;
}
@@ -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) {
return PHP_FTP_FAILED;
goto bail;
}
if (!ftp_type(ftp, type)) {
-3
View File
@@ -39,9 +39,6 @@ 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)) {
-1
View File
@@ -1090,7 +1090,6 @@ 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.
-16
View File
@@ -1,16 +0,0 @@
--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,7 +2,8 @@
image_type_to_mime_type()
--SKIPIF--
<?php
if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
require_once('skipif_imagetype.inc');
?>
--FILE--
<?php
@@ -60,4 +61,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
+1 -1
View File
@@ -3,7 +3,7 @@ imagecopyresampled()
--SKIPIF--
<?php
if (!function_exists('imagecopyresampled')) die('skip imagecopyresampled() not available');
if (!(imagetype() & IMG_PNG)) die('skip PNG Support is not enabled');
require_once('skipif_imagetype.inc');
?>
--FILE--
<?php
+1 -1
View File
@@ -3,7 +3,7 @@ imagedashedline()
--SKIPIF--
<?php
if (!function_exists('imagedashedline')) die('skip imagedashedline() not available');
if (!(imagetype() & IMG_PNG)) die('skip PNG Support is not enabled');
require_once('skipif_imagetype.inc');
?>
--FILE--
<?php
+1 -1
View File
@@ -3,7 +3,7 @@ imagefilledpolygon()
--SKIPIF--
<?php
if (!function_exists('imagefilledpolygon')) die('skip imagefilledpolygon() not available');
if (!(imagetype() & IMG_PNG)) die('skip PNG Support is not enabled');
require_once('skipif_imagetype.inc');
?>
--FILE--
<?php
+1 -1
View File
@@ -5,7 +5,7 @@ Ivan Rosolen <contato [at] ivanrosolen [dot] com>
#testfest PHPSP on 2009-06-30
--SKIPIF--
<?php
if ( ! extension_loaded('gd') ) die( 'skip GD not present; skipping test' );
if ( ! extension_loaded('gd') ) die( 'GD not present; skipping test' );
?>
--FILE--
<?php
+1 -1
View File
@@ -5,7 +5,7 @@ Ivan Rosolen <contato [at] ivanrosolen [dot] com>
#testfest PHPSP on 2009-06-30
--SKIPIF--
<?php
if ( ! extension_loaded('gd') ) die( 'skip GD not present; skipping test' );
if ( ! extension_loaded('gd') ) die( 'GD not present; skipping test' );
?>
--FILE--
<?php
-36
View File
@@ -1,36 +0,0 @@
--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
+1 -5
View File
@@ -5,10 +5,6 @@ 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])
@@ -95,4 +91,4 @@ array(3) {
["internal_encoding"]=>
string(5) "UTF-8"
}
Done
Done
+1 -5
View File
@@ -5,10 +5,6 @@ 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])
@@ -56,4 +52,4 @@ string(14) "a5e69cace8aa9e"
-- Multibyte string 2 --
string(42) "e8aa9ee38386e382ade382b9e38388e381a7e38199"
Done
Done
-1
View File
@@ -115,7 +115,6 @@ 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)
+7 -11
View File
@@ -1061,21 +1061,17 @@ 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);
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);
-4
View File
@@ -1,9 +1,5 @@
--TEST--
Bug #48696 (ldap_read() segfaults with invalid parameters)
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
?>
--FILE--
<?php
-3
View File
@@ -626,9 +626,6 @@ 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);
+4 -4
View File
@@ -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, php_cv_mbstring_stdarg, [
AC_CACHE_CHECK(for variable length prototypes and stdarg.h, cv_php_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); }
], [php_cv_mbstring_stdarg=yes], [php_cv_mbstring_stdarg=no], [
], [cv_php_mbstring_stdarg=yes], [cv_php_mbstring_stdarg=no], [
dnl cross-compile needs something here
case $host_alias in
*netware*)
php_cv_mbstring_stdarg=yes
cv_php_mbstring_stdarg=yes
;;
*)
php_cv_mbstring_stdarg=no
cv_php_mbstring_stdarg=no
;;
esac
])
+10 -17
View File
@@ -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 & 0x0f) {
switch (filter->status & 0xff) {
case 0:
if (endian) {
n = c & 0xff;
@@ -144,8 +144,15 @@ int mbfl_filt_conv_utf16_wchar(int c, mbfl_convert_filter *filter)
n = c & 0xff;
}
n |= filter->cache & 0xffff;
filter->status &= ~0x0f;
if (n >= 0xd800 && n < 0xdc00) {
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->cache = ((n & 0x3ff) << 16) + 0x400000;
} else if (n >= 0xdc00 && n < 0xe000) {
n &= 0x3ff;
@@ -159,21 +166,7 @@ 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;
+1 -1
View File
@@ -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 (filter->status) {
} else if (c != 0 && filter->status) {
filter->flag = 1; /* bad */
}
filter->status = 0;
+1 -1
View File
@@ -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 && (!strict || !filter->status)) {
if (!filter->flag) {
encoding = filter->encoding;
break;
}
+3
View File
@@ -2272,6 +2272,9 @@ 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) {
+1 -1
View File
@@ -38,7 +38,7 @@ foreach($inputs as $input) {
};
?>
--EXPECTF--
--EXPECTF----
-- Iteration 1 --
Without $regs arg:
-2
View File
@@ -1,7 +1,5 @@
--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"));
-24
View File
@@ -1,24 +0,0 @@
--TEST--
Bug #48697 (mb_internal_encoding() value gets reset by parse_str()
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--FILE--
<?php
ini_set('mbstring.internal_encoding', 'ISO-8859-15');
ini_set('mbstring.encoding_translation', true);
var_dump(mb_internal_encoding());
mb_internal_encoding('UTF-8');
var_dump(mb_internal_encoding());
parse_str('a=b');
var_dump(mb_internal_encoding());
mb_internal_encoding('UTF-8');
var_dump(mb_internal_encoding());
parse_str('a=b');
var_dump(mb_internal_encoding());
?>
--EXPECT--
string(11) "ISO-8859-15"
string(5) "UTF-8"
string(5) "UTF-8"
string(5) "UTF-8"
string(5) "UTF-8"
-21
View File
@@ -1,21 +0,0 @@
--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)
-20
View File
@@ -1,20 +0,0 @@
--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"
-20
View File
@@ -1,20 +0,0 @@
--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)
-1
View File
@@ -613,7 +613,6 @@ 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 -1
View File
@@ -1,4 +1,4 @@
--TEST--
--TEST---
Bug #46010 (warnings incorrectly generated for iv in ecb mode)
--FILE--
<?php
-13
View File
@@ -1,13 +0,0 @@
--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
-2
View File
@@ -166,8 +166,6 @@
#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
+1 -5
View File
@@ -1003,11 +1003,7 @@ PHP_MYSQLI_API void php_mysqli_set_error(long mysql_errno, char *mysql_err TSRML
if (MyG(error_msg)) {
efree(MyG(error_msg));
}
if(mysql_err && *mysql_err) {
MyG(error_msg) = estrdup(mysql_err);
} else {
MyG(error_msg) = NULL;
}
MyG(error_msg) = estrdup(mysql_err);
}
/* }}} */
+4 -3
View File
@@ -364,7 +364,7 @@ PHP_FUNCTION(mysqli_stmt_bind_result)
bind[ofs].buffer = stmt->result.buf[ofs].val;
bind[ofs].is_null = &stmt->result.is_null[ofs];
bind[ofs].buffer_length = stmt->result.buf[ofs].buflen;
bind[ofs].length = &stmt->result.buf[ofs].output_len;
bind[ofs].length = &stmt->result.buf[ofs].buflen;
break;
}
default:
@@ -735,7 +735,7 @@ PHP_FUNCTION(mysqli_stmt_fetch)
#else
{
#endif
ZVAL_STRINGL(stmt->result.vars[i], stmt->result.buf[i].val, stmt->result.buf[i].output_len, 1);
ZVAL_STRINGL(stmt->result.vars[i], stmt->result.buf[i].val, stmt->result.buf[i].buflen, 1);
}
}
break;
@@ -1848,13 +1848,14 @@ 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 (!mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) {
if ((rc = mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode))) {
RETURN_FALSE;
}
RETURN_TRUE;
+1 -2
View File
@@ -52,9 +52,8 @@ enum mysqli_status {
};
typedef struct {
char *val;
ulong buflen;
ulong output_len;
char *val;
ulong type;
} VAR_BUFFER;
+14 -6
View File
@@ -725,10 +725,6 @@ 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);
@@ -929,7 +925,13 @@ PHP_FUNCTION(odbc_prepare)
/* Try to set CURSOR_TYPE to dynamic. Driver will replace this with other
type if not possible.
*/
SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, ODBCG(default_cursortype));
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;
}
}
} else {
result->fetch_abs = 0;
@@ -1344,7 +1346,13 @@ PHP_FUNCTION(odbc_exec)
/* Try to set CURSOR_TYPE to dynamic. Driver will replace this with other
type if not possible.
*/
SQLSetStmtOption(result->stmt, SQL_CURSOR_TYPE, ODBCG(default_cursortype));
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;
}
}
} else {
result->fetch_abs = 0;
+8 -16
View File
@@ -49,10 +49,6 @@
/* 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
@@ -1448,18 +1444,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;
@@ -3849,15 +3845,8 @@ int php_openssl_apply_verification_policy(SSL *ssl, X509 *peer, php_stream *stre
GET_VER_OPT_STRING("CN_match", cnmatch);
if (cnmatch) {
int match = 0;
int name_len = X509_NAME_get_text_by_NID(name, NID_commonName, buf, sizeof(buf));
if (name_len == -1) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to locate peer certificate CN");
return FAILURE;
} else if (name_len != strlen(buf)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Peer certificate CN=`%.*s' is malformed", name_len, buf);
return FAILURE;
}
X509_NAME_get_text_by_NID(name, NID_commonName, buf, sizeof(buf));
match = strcmp(cnmatch, buf) == 0;
if (!match && strlen(buf) > 3 && buf[0] == '*' && buf[1] == '.') {
@@ -3872,7 +3861,10 @@ int php_openssl_apply_verification_policy(SSL *ssl, X509 *peer, php_stream *stre
if (!match) {
/* didn't match */
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Peer certificate CN=`%.*s' did not match expected CN=`%s'", name_len, buf, cnmatch);
php_error_docref(NULL TSRMLS_CC, E_WARNING,
"Peer certificate CN=`%s' did not match expected CN=`%s'",
buf, cnmatch);
return FAILURE;
}
}
+3 -3
View File
@@ -28,12 +28,12 @@ function ssl_server($port) {
$r = array($link);
$w = array();
$e = array();
if (stream_select($r, $w, $e, 1, 0) != 0)
if (stream_select($r, $w, $e, 0, 1000) != 0)
$data .= fread($link, 8192);
$r = array();
$w = array($link);
if (stream_select($r, $w, $e, 1, 0) != 0)
if (stream_select($r, $w, $e, 0, 1000) != 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, 1, 0) != 0)
if (stream_select($r, $w, $e, 0, 10) != 0)
{
$data .= fread($socket, 1024);
}
-4
View File
@@ -272,10 +272,6 @@ static int php_openssl_sockop_close(php_stream *stream, int close_handle TSRMLS_
SSL_CTX_free(sslsock->ctx);
sslsock->ctx = NULL;
}
#ifdef PHP_WIN32
if (sslsock->s.socket == -1)
sslsock->s.socket = SOCK_ERR;
#endif
if (sslsock->s.socket != SOCK_ERR) {
#ifdef PHP_WIN32
/* prevent more data from coming in */
+3 -35
View File
@@ -217,7 +217,6 @@ 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) {
@@ -236,21 +235,14 @@ 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] == ';') {
if ((i + 1 >= data_source_len) || data_source[i+1] != ';') {
semi = i++;
break;
} else {
n_semicolumns++;
i += 2;
continue;
}
semi = i++;
break;
}
++i;
}
@@ -267,31 +259,7 @@ PDO_API int php_pdo_parse_data_source(const char *data_source,
if (parsed[j].freeme) {
efree(parsed[j].optval);
}
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].optval = estrndup(data_source + valstart, semi - valstart);
parsed[j].freeme = 1;
++n_matches;
break;
+3 -2
View File
@@ -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 == NULL || dbh->error_mode == PDO_ERRMODE_SILENT) {
if (dbh->error_mode == PDO_ERRMODE_SILENT) {
return;
}
@@ -1091,7 +1091,8 @@ static PHP_METHOD(PDO, quote)
char *qstr;
int qlen;
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &str, &str_len, &paramtype)) {
if (FAILURE == zend_parse_parameters(1 TSRMLS_CC, "s|l", &str, &str_len,
&paramtype)) {
RETURN_FALSE;
}
+51 -64
View File
@@ -509,7 +509,6 @@ 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();
@@ -588,8 +587,9 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ
case PDO_PARAM_LOB:
if (value == NULL) {
ZVAL_NULL(dest);
} else if (value[0] == '\0') {
ZVAL_EMPTY_STRING(dest);
} else if (value_len == 0) {
/* Warning, empty strings need to be passed as stream */
if (stmt->dbh->stringify || new_type == PDO_PARAM_STR) {
char *buf = NULL;
size_t len;
@@ -1103,32 +1103,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;
default:
break;
}
for (idx = 0; i < stmt->column_count; i++, idx++) {
zval *val;
MAKE_STD_ZVAL(val);
@@ -1262,6 +1236,27 @@ 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;
@@ -2603,29 +2598,27 @@ static zval *row_prop_or_dim_read(zval *object, zval *member, int type TSRMLS_DC
MAKE_STD_ZVAL(return_value);
RETVAL_NULL();
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 (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);
}
}
return_value->refcount = 0;
@@ -2644,18 +2637,16 @@ 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 (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);
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;
}
}
}
@@ -2673,10 +2664,6 @@ 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);
+4 -4
View File
@@ -34,7 +34,7 @@ class TestDerived extends TestBase
public function __construct(&$row)
{
echo __METHOD__ . "($row)\n";
echo __METHOD__ . "($row,{$this->id})\n";
$this->row = $row++;
}
}
@@ -108,9 +108,9 @@ array(3) {
string(2) "CC"
}
}
TestDerived::__construct(0)
TestDerived::__construct(1)
TestDerived::__construct(2)
TestDerived::__construct(0,1)
TestDerived::__construct(1,2)
TestDerived::__construct(2,3)
array(3) {
[0]=>
object(TestDerived)#%d (5) {
-21
View File
@@ -1,21 +0,0 @@
--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
}
+5 -5
View File
@@ -230,11 +230,11 @@ static int pdo_dblib_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_
goto cleanup;
}
/* dblib do not return more than this length from text/image */
DBSETOPT(H->link, DBTEXTLIMIT, "2147483647");
/* limit text/image from network */
DBSETOPT(H->link, DBTEXTSIZE, "2147483647");
#if PHP_DBLIB_IS_MSSQL
if (DBSETOPT(H->link, DBTEXTLIMIT, "2147483647") == FAIL) {
goto cleanup;
}
#endif
if (vars[3].optval && FAIL == dbuse(H->link, vars[3].optval)) {
goto cleanup;
+1 -1
View File
@@ -38,7 +38,7 @@ zend_function_entry pdo_firebird_functions[] = { /* {{{ */
/* {{{ pdo_firebird_deps
*/
#if ZEND_MODULE_API_NO >= 20050922
static zend_module_dep pdo_firebird_deps[] = {
static const zend_module_dep pdo_firebird_deps[] = {
ZEND_MOD_REQUIRED("pdo")
{NULL, NULL, NULL}
};
Loaded 100 of 232 files, more files were not shown because too many files have changed in this diff. Show more