Compare commits

...
96 Commits
Author SHA1 Message Date
Stanislav Malyshev 67f69d7be0 5.4.10 2012-12-18 22:55:19 -08:00
Stanislav Malyshev 12b0189c18 5.4.10 rc1 2012-12-04 21:36:09 -08:00
Stanislav Malyshev d398456e48 update NEWS 2012-12-04 21:27:25 -08:00
Stanislav Malyshev fd650ec93e fix bug #63666 - Poor date() performance 2012-12-04 21:02:09 -08:00
Anatoliy Belsky b8553d8494 Revert the previous test fix
The fail seems to be due to network error
2012-12-03 15:14:43 +01:00
Anatoliy Belsky 89e547ce7f Fix test with a slightly different warning in TS 2012-12-03 10:41:17 +01:00
Marco Pivetta 627eb9e3d9 Adding tests for private and protected properties 2012-12-02 19:47:18 +01:00
Marco Pivetta 12f451c771 Fixing test according to @jpauli's suggestions 2012-12-02 19:47:13 +01:00
Marco Pivetta 1377942b69 Adding regression test for behavior of magic methods with unset public properties
Verifies that after having unset a public property, any access to it, be it read or write, causes calls to public magic methods

Signed-off-by: Marco Pivetta <ocramius@gmail.com>
2012-12-02 19:47:09 +01:00
Lars Strojny 12de2e91d0 News entry for bug #49341 2012-12-02 19:41:19 +01:00
Igor Wiedler ec2a132f9c Bug #49341: Add SO_REUSEPORT support for socket_set_option()
This is a BSD-only feature, and it will only be available on BSD.
On other platforms the constant will simply not be set.
2012-12-02 18:56:57 +01:00
Remi Collet 7552a7eb19 NEWS 2012-12-01 10:26:20 +01:00
Remi Collet e9c1a45daa Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  NEWS
2012-12-01 10:25:49 +01:00
Remi Collet 31ab57e052 NEWS 2012-12-01 10:25:37 +01:00
Remi Collet 92a5e4def0 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed Bug #63435 Datetime::format('u') sometimes wrong by 1 microsecond
2012-12-01 10:24:02 +01:00
Remi Collet c2554b4bb4 Fixed Bug #63435 Datetime::format('u') sometimes wrong by 1 microsecond
When storing '015700' microseconds in a Datetime object,
Datetime::format('u') returns '015699'

Already known per bug45554 reproducer (also fixed).
2012-12-01 10:20:39 +01:00
Xinchen Hui 35f636019d Merge branch 'PHP-5.3' into PHP-5.4 2012-11-30 14:49:35 +08:00
Xinchen Hui ff6c9e2726 Fixed bug #63377 (Segfault on output buffer) 2012-11-30 14:48:51 +08:00
Xinchen Hui 96300f551a format 2012-11-30 14:33:29 +08:00
Xinchen Hui dc36933181 Merge branch 'PHP-5.3' into PHP-5.4 2012-11-30 14:33:24 +08:00
Xinchen Hui 00d86afedf Format 2012-11-30 14:32:15 +08:00
Xinchen Hui b689819567 Merge branch 'PHP-5.3' into PHP-5.4 2012-11-30 14:29:59 +08:00
Xinchen Hui 40fabf68ed Fixed bug #63398 (Segfault when polling closed link) 2012-11-30 14:28:32 +08:00
Dmitry Stogov 7f7cff0bbb Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63271 (SOAP wsdl cache is not enabled after initial requests)

Conflicts:
	NEWS
	ext/soap/soap.c
2012-11-29 16:41:09 +04:00
Dmitry Stogov dc2192c087 Fixed bug #63271 (SOAP wsdl cache is not enabled after initial requests) 2012-11-29 16:31:08 +04:00
Dmitry Stogov 1a09bf8023 Fixed bug #61557 (Crasher in tt-rss backend.php) 2012-11-29 14:38:18 +04:00
Dmitry Stogov f877d7fee6 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63635 (Segfault in gc_collect_cycles)

Conflicts:
	NEWS
2012-11-29 12:38:34 +04:00
Dmitry Stogov 92e2f29381 Fixed bug #63635 (Segfault in gc_collect_cycles) 2012-11-29 12:25:20 +04:00
Remi Collet c37d7a9456 NEWS 2012-11-28 10:45:23 +01:00
Remi Collet 487b7c7f32 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed Bug #63581 Possible buffer overflow
  Fixed Bug #63581 Possible null dereference
2012-11-28 10:38:13 +01:00
Remi Collet bc492007da Fixed Bug #63581 Possible buffer overflow
In fpm-log, possible buffer overflow. Check for length is done at
the beginning of the loop, so is not done when overflow occurs
on the last loop (len = 1024 or 1025). (ack from fat).

This issue where found from by static code analysis tool and, so,
I can't provide any reproducer.
2012-11-28 10:35:04 +01:00
Remi Collet 0f4772d12f Merge branch 'PHP-5.4' of git.php.net:php-src into PHP-5.4
* 'PHP-5.4' of git.php.net:php-src:
  BFN #61272
  fix bug #61272 ob_start callback get passed empty string
  Fixed bug #63590 Fileinfo delivers ifferent results in TS and NTS under Windows
  This test isn't supposed to pass on windows
  Fixed Bug #63614 (Fatal error on Reflection)
2012-11-28 10:31:49 +01:00
Remi Collet f08060a48f Fixed Bug #63581 Possible null dereference
Possible NULL dereference when trying to delete the single item
of a list (ack from fat).

This issues where found from by static code analysis tool and,
so, I can't provide any reproducer.
2012-11-28 10:28:18 +01:00
Remi Collet 1e6baa2673 Merge branch 'PHP-5.3' of git.php.net:php-src into PHP-5.3
* 'PHP-5.3' of git.php.net:php-src:
  Fixed bug #63590 Fileinfo delivers ifferent results in TS and NTS under Windows
  This test isn't supposed to pass on windows
  Fixed Bug #63614 (Fatal error on Reflection)
2012-11-28 10:24:32 +01:00
Michael Wallner be1e5b9c54 BFN #61272 2012-11-28 10:23:26 +01:00
Michael Wallner 575790e842 fix bug #61272 ob_start callback get passed empty string 2012-11-28 10:19:44 +01:00
Anatoliy Belsky d88017e992 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63590 Fileinfo delivers ifferent results in TS and NTS under Windows

Conflicts:
	NEWS
	ext/fileinfo/libmagic.patch
	ext/fileinfo/tests/finfo_open_error-win32.phpt
2012-11-27 16:45:25 +01:00
Anatoliy Belsky e6b727d3b7 Fixed bug #63590 Fileinfo delivers ifferent results in TS and NTS under Windows 2012-11-27 16:33:58 +01:00
Anatoliy Belsky e0ad33c24a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  This test isn't supposed to pass on windows
2012-11-27 16:11:53 +01:00
Anatoliy Belsky eff12e56b6 This test isn't supposed to pass on windows 2012-11-27 16:02:55 +01:00
Xinchen Hui 070239a194 Merge branch 'PHP-5.3' into PHP-5.4 2012-11-27 13:36:38 +08:00
Xinchen Hui df3b9a1e07 Fixed Bug #63614 (Fatal error on Reflection) 2012-11-27 13:34:36 +08:00
Remi Collet 7751a68824 Related bug #63588 fix length computation + optimize for speed
Following comment from Yoram "The patch looks fine, except of testing
for true value of utf16 in each iteration."
Also fix the length computation during check phase.
2012-11-26 12:59:08 +01:00
Remi Collet 289bb339c9 Fixed bug #63588 Duplicate implementation of php_next_utf8_char
Json use an utf8 parser from a third party library, switch to
our implementation of php_next_utf8_char.
This also helps on solving #63520. All the unit tests succeed.
Our implementation also seems a little faster.

json.dsp need to be regenerated.
2012-11-25 08:14:23 +01:00
Remi Collet 8d2c44b59d Fixed Bug #63361 Header not installed
ext/mysqli/php_mysqli_structs.h is installed and includes
mysqli_mysqlnd.h or mysqli_libmysql.h. So this header must also
be installed.
2012-11-25 07:46:02 +01:00
Remi Collet 137503dd6f NEWS entries 2012-11-25 07:40:39 +01:00
Stanislav Malyshev c08e2c8c17 fix NEWS 2012-11-24 16:28:56 -08:00
Stanislav Malyshev 7262bf67a2 5.4.10-dev 2012-11-24 16:24:05 -08:00
Remi Collet 67e67c254d Fixed Bug #63149 Feature missing with system SQLite
In pdo_sqlite, getColumnMeta should return the table name.
With bundled SQLite library, -DSQLITE_ENABLE_COLUMN_METADATA=1 (other_flags)
enable the feature in SQLite (function sqlite3_column_table_name).
With system SQLite library, this fix detects if sqlite3_column_table_name is
available and add SQLITE_ENABLE_COLUMN_METADATA macro to get the same behavior.

Test already exists: ext/pdo_sqlite/tests/bug_42589.phpt
2012-11-24 17:47:51 +01:00
Remi Collet 88d2b8c5fd Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  add unit test for bug 63126
  NEWS
2012-11-24 17:31:18 +01:00
Remi Collet 92147243bf add unit test for bug 63126 2012-11-24 17:30:48 +01:00
Remi Collet 90d2561a9c NEWS 2012-11-24 15:23:25 +01:00
Remi Collet 7cd2f4b6a6 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed Bug #63126 DISABLE_AUTHENTICATOR ignores array
2012-11-24 15:01:24 +01:00
Remi Collet f55bed9dad Fixed Bug #63126 DISABLE_AUTHENTICATOR ignores array 2012-11-24 15:00:03 +01:00
Anatoliy Belsky 9d8ed21bd5 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Backported the fix for bug #63248 from 5.4+
2012-11-23 14:00:30 +01:00
Anatoliy Belsky 8a84b1b5d9 Backported the fix for bug #63248 from 5.4+ 2012-11-23 13:58:22 +01:00
Anatoliy Belsky dc862f4fd4 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed test for bug #63297
2012-11-22 19:04:49 +01:00
Anatoliy Belsky 1702024073 Fixed test for bug #63297 2012-11-22 19:01:09 +01:00
Johannes Schlüter 6bd0a92a35 Merge branch 'PHP-5.3' into PHP-5.4 2012-11-21 21:09:57 +01:00
Johannes Schlüter cc315e79e1 PHP 5.3.19 2012-11-21 21:09:25 +01:00
Xinchen Hui e54970aaf1 Unused variable copystr
copystr is declared again blow
2012-11-21 12:30:03 +08:00
Dmitry Stogov 111aa9fd2e Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63468 (wrong called method as callback with inheritance)

Conflicts:
	NEWS
2012-11-20 12:54:40 +04:00
Dmitry Stogov 396c1e990a Fixed bug #63468 (wrong called method as callback with inheritance) 2012-11-20 12:51:55 +04:00
Christopher Jones 75746d60b6 Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Regenerate Zend ini scanner
  Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value
2012-11-18 14:20:53 -08:00
Christopher Jones d412152f31 Merge branch 'PHP-5.3' of https://git.php.net/repository/php-src into PHP-5.3
* 'PHP-5.3' of https://git.php.net/repository/php-src:
  Regenerate Zend ini scanner
  Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value
2012-11-18 14:20:49 -08:00
Pierrick Charron 99edb55e41 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Regenerate Zend ini scanner

Conflicts:
	Zend/zend_ini_scanner.c
	Zend/zend_ini_scanner_defs.h
2012-11-16 18:24:42 -05:00
Pierrick Charron c886691100 Regenerate Zend ini scanner
Regenerate both zend_ini_scanner.c and zend_ini_scanner_defs.h
2012-11-16 18:16:21 -05:00
Pierrick Charron 15ab75be8a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value
2012-11-16 18:07:02 -05:00
Pierrick Charron 6dff07aa8c Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value
Restore the old behavior but keep bug 51094 fixed
2012-11-16 18:04:14 -05:00
Christopher Jones 975fb4e3ea Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src:
  Skip test if directory does not exist
  Fixed test sapi/cli/tests/006.phpt
  Fixed compiler reenterability
  Fixed compiler reenterability
  UPdated NEWS
  Updated NEWS
2012-11-15 19:29:48 -08:00
Christopher Jones 16f9f46935 Merge branch 'PHP-5.3' of https://git.php.net/repository/php-src into PHP-5.3
* 'PHP-5.3' of https://git.php.net/repository/php-src:
  Skip test if directory does not exist
  Updated NEWS
2012-11-15 19:29:44 -08:00
Johannes Schlüter 2a59f1d06c Merge branch 'PHP-5.3' into PHP-5.4 2012-11-15 12:29:38 +01:00
Johannes Schlüter 7468fc0e37 Skip test if directory does not exist
Would be good to run this using a directory which is existing
everywhere.
2012-11-15 12:28:19 +01:00
Anatoliy Belsky 3d82f16c7d Fixed test sapi/cli/tests/006.phpt
Third param in preg_match_all() is optional for a while )
2012-11-14 16:20:59 +01:00
Dmitry Stogov f99befadbd Fixed compiler reenterability 2012-11-14 17:47:27 +04:00
Dmitry Stogov 65585b3aa2 Fixed compiler reenterability 2012-11-14 17:45:10 +04:00
Anatoliy Belsky 5a1d2fe415 UPdated NEWS 2012-11-14 10:06:46 +01:00
Anatoliy Belsky 55a4da7f53 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Updated NEWS
2012-11-14 10:04:27 +01:00
Anatoliy Belsky f5d8b638c7 Updated NEWS 2012-11-14 10:02:35 +01:00
Anatoliy Belsky 117d2dd688 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Enabled apache 2.4 handler build option

Conflicts:
	sapi/apache2handler/config.w32
2012-11-13 19:40:22 +01:00
Pierre Joye 019bdff395 Enabled apache 2.4 handler build option 2012-11-13 19:34:00 +01:00
Derick Rethans 4f36aeb120 Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	NEWS
2012-11-13 10:16:58 +00:00
Derick Rethans 00ad4c0e6a - Updated to version 2012.10 (2012j) 2012-11-13 10:15:34 +00:00
Derick Rethans 1e081a825e Merge branch 'PHP-5.3' of git.php.net:/php-src into PHP-5.3 2012-11-13 10:10:41 +00:00
Derick Rethans d9aea7cd4d Merge branch 'PHP-5.4' of git.php.net:/php-src into PHP-5.4 2012-11-13 10:10:28 +00:00
Adam Harvey 6b9df7a454 Merge branch 'preg_match_all_arginfo' into PHP-5.4
* preg_match_all_arginfo:
  Update arginfo for preg_match_all() to reflect reality.
2012-11-12 20:08:01 +08:00
Adam Harvey bca8ff723d Update arginfo for preg_match_all() to reflect reality.
Back when I implemented FR #53238 during the 5.4 development phase to make the
$matches parameter optional in preg_match_all(), it turns out I forgot to
update the arginfo to note that only 2 parameters are now required by
preg_match_all(). The function itself works fine, but reflection was reporting
the wrong number of required parameters.
2012-11-12 20:04:26 +08:00
Antony Dovgal 5b82fb52fd fix invalid read when trimming empty string 2012-11-11 22:38:14 +04:00
Antony Dovgal bb60122c2f fix invalid read when trimming empty string 2012-11-11 22:37:04 +04:00
Felipe Pena 065862a750 - BFN 2012-11-09 21:28:30 -02:00
Felipe Pena 964acdaa35 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #63451 (config.guess file does not have AIX 7 defined, shared objects are not created)
2012-11-09 21:23:10 -02:00
Felipe Pena 44a6fe8411 - Fixed bug #63451 (config.guess file does not have AIX 7 defined, shared objects are not created) 2012-11-09 21:22:27 -02:00
Johannes Schlüter 9d95f7d286 Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	configure.in
	main/php_version.h
2012-11-08 00:03:37 +01:00
Johannes Schlüter 417b1b238f This will be PHP 5.3.20 2012-11-08 00:01:43 +01:00
Derick Rethans db0f623490 Merge branch 'PHP-5.3' into PHP-5.4 2012-11-04 16:24:02 +00:00
Derick Rethans 1784279be0 - Updated to version 2012.9 (2012i) 2012-11-04 16:23:58 +00:00
58 changed files with 3250 additions and 2819 deletions

No files matched your search

+71 -1
View File
@@ -1,6 +1,64 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2012, PHP 5.4.9
20 Dec 2012, PHP 5.4.10
- Core:
. Fixed bug #63635 (Segfault in gc_collect_cycles). (Dmitry)
. Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes
from value). (Pierrick)
. Fixed bug #63468 (wrong called method as callback with inheritance).
(Laruence)
. Fixed bug #63451 (config.guess file does not have AIX 7 defined,
shared objects are not created). (kemcline at au1 dot ibm dot com)
. Fixed bug #61557 (Crasher in tt-rss backend.php).
(i dot am dot jack dot mail at gmail dot com)
. Fixed bug #61272 (ob_start callback gets passed empty string).
(Mike, casper at langemeijer dot eu)
- Date:
. Fixed bug #63666 (Poor date() performance). (Paul Talborg).
. Fixed bug #63435 (Datetime::format('u') sometimes wrong by 1 microsecond).
(Remi)
- Imap:
. Fixed bug #63126 (DISABLE_AUTHENTICATOR ignores array). (Remi)
- Json:
. Fixed bug #63588 (use php_next_utf8_char and remove duplicate
implementation). (Remi)
- MySQLi:
. Fixed bug #63361 (missing header). (Remi)
- MySQLnd:
. Fixed bug #63398 (Segfault when polling closed link). (Laruence)
- Fileinfo:
. Fixed bug #63590 (Different results in TS and NTS under Windows).
(Anatoliy)
- FPM:
. Fixed bug #63581 Possible null dereference and buffer overflow (Remi)
- Pdo_sqlite:
. Fixed Bug #63149 getColumnMeta should return the table name
when system SQLite used. (Remi)
- Apache2 Handler SAPI:
. Enabled Apache 2.4 configure option for Windows (Pierre, Anatoliy)
- Reflection:
. Fixed Bug #63614 (Fatal error on Reflection). (Laruence)
- SOAP
. Fixed bug #63271 (SOAP wsdl cache is not enabled after initial requests).
(John Jawed, Dmitry)
- Sockets
. Fixed bug #49341 (Add SO_REUSEPORT support for socket_set_option()).
(Igor Wiedler, Lars)
22 Nov 2012, PHP 5.4.9
- Core:
. Fixed bug #63305 (zend_mm_heap corrupted with traits). (Dmitry, Laruence)
@@ -37,10 +95,22 @@ PHP NEWS
(Dmitry, Laruence)
. Fixed bug #63284 (Upgrade PCRE to 8.31). (Anatoliy)
- PDO:
. Fixed bug #63235 (buffer overflow in use of SQLGetDiagRec).
(Martin Osvald, Remi)
- PDO_pgsql:
. Fixed bug #62593 (Emulate prepares behave strangely with PARAM_BOOL).
(Will Fitch)
- Phar:
. Fixed bug #63297 (Phar fails to write an openssl based signature).
(Anatoliy)
- Streams:
. Fixed bug #63240 (stream_get_line() return contains delimiter string).
(Tjerk, Gustavo)
- Reflection:
. Fixed bug #63399 (ReflectionClass::getTraitAliases() incorrectly resolves
traitnames). (Laruence)
+2
View File
@@ -525,6 +525,8 @@ b. Extensions with changed behavior
must be activated manually with the "extension = php_com_dotnet.dll" directive
in php.ini.
- Apache 2.4 handler is supported as of PHP 5.4.9
==================
12. New in PHP 5.4
==================
+30
View File
@@ -0,0 +1,30 @@
--TEST--
Bug #63468 (wrong called method as callback with inheritance)
--FILE--
<?php
class Foo
{
public function run()
{
return call_user_func(array('Bar', 'getValue'));
}
private static function getValue()
{
return 'Foo';
}
}
class Bar extends Foo
{
public static function getValue()
{
return 'Bar';
}
}
$x = new Bar;
var_dump($x->run());
--EXPECT--
string(3) "Bar"
+58
View File
@@ -0,0 +1,58 @@
--TEST--
Bug #63635 (Segfault in gc_collect_cycles)
--FILE--
<?php
class Node {
public $parent = NULL;
public $childs = array();
function __construct(Node $parent=NULL) {
if ($parent) {
$parent->childs[] = $this;
}
$this->childs[] = $this;
}
function __destruct() {
$this->childs = NULL;
}
}
define("MAX", 16);
for ($n = 0; $n < 20; $n++) {
$top = new Node();
for ($i=0 ; $i<MAX ; $i++) {
$ci = new Node($top);
for ($j=0 ; $j<MAX ; $j++) {
$cj = new Node($ci);
for ($k=0 ; $k<MAX ; $k++) {
$ck = new Node($cj);
}
}
}
echo "$n\n";
}
echo "ok\n";
--EXPECT--
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ok
+1 -1
View File
@@ -2732,7 +2732,7 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
} else if (zend_hash_find(ftable, lmname, mlen+1, (void**)&fcc->function_handler) == SUCCESS) {
retval = 1;
if ((fcc->function_handler->op_array.fn_flags & ZEND_ACC_CHANGED) &&
EG(scope) &&
!strict_class && EG(scope) &&
instanceof_function(fcc->function_handler->common.scope, EG(scope) TSRMLS_CC)) {
zend_function *priv_fbc;
+1
View File
@@ -219,6 +219,7 @@ ZEND_API void file_handle_dtor(zend_file_handle *fh) /* {{{ */
void init_compiler(TSRMLS_D) /* {{{ */
{
CG(active_op_array) = NULL;
memset(&CG(context), 0, sizeof(CG(context)));
zend_init_compiler_data_structures(TSRMLS_C);
zend_init_rsrc_list(TSRMLS_C);
zend_hash_init(&CG(filenames_table), 5, NULL, (dtor_func_t) free_estring, 0);
+4 -2
View File
@@ -644,7 +644,8 @@ tail_call:
struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj;
if (obj->buffered == (gc_root_buffer*)GC_WHITE) {
GC_SET_BLACK(obj->buffered);
/* PURPLE instead of BLACK to prevent buffering in nested gc calls */
GC_SET_PURPLE(obj->buffered);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
(get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) {
@@ -715,7 +716,8 @@ static void zobj_collect_white(zval *pz TSRMLS_DC)
struct _store_object *obj = &EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].bucket.obj;
if (obj->buffered == (gc_root_buffer*)GC_WHITE) {
GC_SET_BLACK(obj->buffered);
/* PURPLE instead of BLACK to prevent buffering in nested gc calls */
GC_SET_PURPLE(obj->buffered);
if (EXPECTED(EG(objects_store).object_buckets[Z_OBJ_HANDLE_P(pz)].valid &&
(get_gc = Z_OBJ_HANDLER_P(pz, get_gc)) != NULL)) {
+1595 -1609
View File
File diff suppressed because it is too large. Load diff
+25 -18
View File
@@ -347,7 +347,7 @@ DOLLAR_CURLY "${"
SECTION_RAW_CHARS [^\]\n\r]
SINGLE_QUOTED_CHARS [^']
RAW_VALUE_CHARS [^"\n\r;\000]
RAW_VALUE_CHARS [^\n\r;\000]
LITERAL_DOLLAR ("$"([^{\000]|("\\"{ANY_CHAR})))
VALUE_CHARS ([^$= \t\n\r;&|~()!"'\000]|{LITERAL_DOLLAR})
@@ -445,33 +445,40 @@ SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
return '=';
}
<ST_RAW>["] {
<ST_RAW>{RAW_VALUE_CHARS} { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
char *sc = NULL;
while (YYCURSOR < YYLIMIT) {
switch (*YYCURSOR++) {
switch (*YYCURSOR) {
case '\n':
SCNG(lineno)++;
break;
case '\r':
if (*YYCURSOR != '\n') {
SCNG(lineno)++;
}
goto end_raw_value_chars;
break;
case '"':
yyleng = YYCURSOR - SCNG(yy_text) - 2;
SCNG(yy_text)++;
RETURN_TOKEN(TC_RAW, yytext, yyleng);
case '\\':
if (YYCURSOR < YYLIMIT) {
YYCURSOR++;
case ';':
if (sc == NULL) {
sc = YYCURSOR;
}
/* no break */
default:
YYCURSOR++;
break;
}
}
end_raw_value_chars:
yyleng = YYCURSOR - SCNG(yy_text);
RETURN_TOKEN(TC_RAW, yytext, yyleng);
}
<ST_RAW>{RAW_VALUE_CHARS}+ { /* Raw value, only used when SCNG(scanner_mode) == ZEND_INI_SCANNER_RAW. */
/* Eat trailing semicolons */
while (yytext[yyleng - 1] == ';') {
yyleng--;
}
/* Eat leading and trailing double quotes */
if (yytext[0] == '"' && yytext[yyleng - 1] == '"') {
SCNG(yy_text)++;
yyleng = yyleng - 2;
} else if (sc) {
YYCURSOR = sc;
yyleng = YYCURSOR - SCNG(yy_text);
}
RETURN_TOKEN(TC_RAW, yytext, yyleng);
}
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Thu Jun 7 17:48:25 2012 */
/* Generated by re2c 0.13.5 on Fri Nov 16 18:24:06 2012 */
#line 3 "Zend/zend_ini_scanner_defs.h"
enum YYCONDTYPE {
File diff suppressed because it is too large. Load diff
+2
View File
@@ -578,6 +578,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
init_op_array(op_array, ZEND_USER_FUNCTION, INITIAL_OP_ARRAY_SIZE TSRMLS_CC);
CG(in_compilation) = 1;
CG(active_op_array) = op_array;
zend_stack_push(&CG(context_stack), (void *) &CG(context), sizeof(CG(context)));
zend_init_compiler_context(TSRMLS_C);
compiler_result = zendparse(TSRMLS_C);
zend_do_return(&retval_znode, 0 TSRMLS_CC);
@@ -747,6 +748,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
init_op_array(op_array, ZEND_EVAL_CODE, INITIAL_OP_ARRAY_SIZE TSRMLS_CC);
CG(interactive) = orig_interactive;
CG(active_op_array) = op_array;
zend_stack_push(&CG(context_stack), (void *) &CG(context), sizeof(CG(context)));
zend_init_compiler_context(TSRMLS_C);
BEGIN(ST_IN_SCRIPTING);
compiler_result = zendparse(TSRMLS_C);
+1 -1
View File
@@ -1,4 +1,4 @@
/* Generated by re2c 0.13.5 on Mon Apr 30 15:55:05 2012 */
/* Generated by re2c 0.13.5 on Wed Nov 14 17:46:56 2012 */
#line 3 "Zend/zend_language_scanner_defs.h"
enum YYCONDTYPE {
+1 -1
View File
@@ -532,7 +532,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[456])
*:AIX:*:[4567])
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
+2 -2
View File
@@ -119,8 +119,8 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=4
PHP_RELEASE_VERSION=9
PHP_EXTRA_VERSION="-dev"
PHP_RELEASE_VERSION=10
PHP_EXTRA_VERSION=""
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
-4
View File
@@ -1836,10 +1836,6 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
case CURLOPT_SSH_PRIVATE_KEYFILE:
#endif
{
#if LIBCURL_VERSION_NUM < 0x071100
char *copystr = NULL;
#endif
convert_to_string_ex(zvalue);
#if LIBCURL_VERSION_NUM >= 0x071300
if (
+600 -568
View File
File diff suppressed because it is too large. Load diff
+8 -4
View File
@@ -948,6 +948,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
timelib_time_offset *offset = NULL;
timelib_sll isoweek, isoyear;
int rfc_colon;
int weekYearSet = 0;
if (!format_len) {
return estrdup("");
@@ -974,7 +975,6 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
offset = timelib_get_time_zone_info(t->sse, t->tz_info);
}
}
timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear);
for (i = 0; i < format_len; i++) {
rfc_colon = 0;
@@ -990,8 +990,12 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
case 'z': length = slprintf(buffer, 32, "%d", (int) timelib_day_of_year(t->y, t->m, t->d)); break;
/* week */
case 'W': length = slprintf(buffer, 32, "%02d", (int) isoweek); break; /* iso weeknr */
case 'o': length = slprintf(buffer, 32, "%d", (int) isoyear); break; /* iso year */
case 'W':
if(!weekYearSet) { timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear); weekYearSet = 1; }
length = slprintf(buffer, 32, "%02d", (int) isoweek); break; /* iso weeknr */
case 'o':
if(!weekYearSet) { timelib_isoweek_from_date(t->y, t->m, t->d, &isoweek, &isoyear); weekYearSet = 1; }
length = slprintf(buffer, 32, "%d", (int) isoyear); break; /* iso year */
/* month */
case 'F': length = slprintf(buffer, 32, "%s", mon_full_names[t->m - 1]); break;
@@ -1023,7 +1027,7 @@ static char *date_format(char *format, int format_len, timelib_time *t, int loca
case 'H': length = slprintf(buffer, 32, "%02d", (int) t->h); break;
case 'i': length = slprintf(buffer, 32, "%02d", (int) t->i); break;
case 's': length = slprintf(buffer, 32, "%02d", (int) t->s); break;
case 'u': length = slprintf(buffer, 32, "%06d", (int) floor(t->f * 1000000)); break;
case 'u': length = slprintf(buffer, 32, "%06d", (int) floor(t->f * 1000000 + 0.5)); break;
/* timezone */
case 'I': length = slprintf(buffer, 32, "%d", localtime ? offset->is_dst : 0); break;
+2 -2
View File
@@ -9,12 +9,12 @@ $d = date_create_from_format($format, "03-15-2005 12:22:29.000000 PST");
echo $d->format($format), "\n";
$d = date_create_from_format($format, "03-15-2005 12:22:29.001001 PST");
echo $d->format($format), " (precision isn't enough to show the 1 here)\n";
echo $d->format($format), "\n";
$d = date_create_from_format($format, "03-15-2005 12:22:29.0010 PST");
echo $d->format($format), "\n";
?>
--EXPECT--
03-15-2005 12:22:29.000000 PST
03-15-2005 12:22:29.001000 PST (precision isn't enough to show the 1 here)
03-15-2005 12:22:29.001001 PST
03-15-2005 12:22:29.001000 PST
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #63435 Datetime::format('u') sometimes wrong by 1 microsecond
--INI--
date.timezone=UTC
--FILE--
<?php
for ($i=1 ; $i<999 ; $i++) {
$datetime = Datetime::createFromFormat("u", sprintf("%06ld", $i));
$res = $datetime->format("u");
if ($res != $i) {
echo "$i != $res\n";
}
}
echo "Done";
--EXPECT--
Done
+40 -36
View File
@@ -1,6 +1,6 @@
diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
--- libmagic.origin/apprentice.c Sat Dec 17 18:17:18 2011
+++ libmagic/apprentice.c Tue Oct 16 10:21:49 2012
diff -u libmagic.orig/apprentice.c libmagic/apprentice.c
--- libmagic.orig/apprentice.c Sat Dec 17 18:17:18 2011
+++ libmagic/apprentice.c Tue Nov 27 16:35:47 2012
@@ -29,6 +29,8 @@
* apprentice - make one pass through /etc/magic, learning its secrets.
*/
@@ -269,11 +269,11 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
+ size_t lineno = 0;
+
+ php_stream *stream;
+
+ TSRMLS_FETCH();
- FILE *f = fopen(ms->file = fn, "r");
- if (f == NULL) {
+ TSRMLS_FETCH();
+
+#if PHP_API_VERSION < 20100412
+ stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL);
+#else
@@ -765,14 +765,18 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
if (strip) {
if ((p = strrchr(fn, '/')) != NULL)
@@ -2370,14 +2406,14 @@
@@ -2370,14 +2406,18 @@
q++;
/* Compatibility with old code that looked in .mime */
if (ms->flags & MAGIC_MIME) {
- asprintf(&buf, "%.*s.mime%s", (int)(q - fn), fn, ext);
- if (access(buf, R_OK) != -1) {
+ spprintf(&buf, MAXPATHLEN, "%.*s.mime%s", (int)(q - fn), fn, ext);
+#ifdef PHP_WIN32
+ if (VCWD_ACCESS(buf, R_OK) == 0) {
+#else
+ if (VCWD_ACCESS(buf, R_OK) != -1) {
+#endif
ms->flags &= MAGIC_MIME_TYPE;
return buf;
}
@@ -784,7 +788,7 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
/* Compatibility with old code that looked in .mime */
if (strstr(p, ".mime") != NULL)
@@ -2467,7 +2503,7 @@
@@ -2467,7 +2507,7 @@
m->offset = swap4((uint32_t)m->offset);
m->in_offset = swap4((uint32_t)m->in_offset);
m->lineno = swap4((uint32_t)m->lineno);
@@ -793,8 +797,8 @@ diff -u libmagic.origin/apprentice.c libmagic/apprentice.c
m->str_range = swap4(m->str_range);
m->str_flags = swap4(m->str_flags);
}
diff -u libmagic.origin/ascmagic.c libmagic/ascmagic.c
--- libmagic.origin/ascmagic.c Sat Dec 17 18:17:18 2011
diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c
--- libmagic.orig/ascmagic.c Sat Dec 17 18:17:18 2011
+++ libmagic/ascmagic.c Tue Apr 10 09:46:33 2012
@@ -139,10 +139,8 @@
/* malloc size is a conservative overestimate; could be
@@ -819,8 +823,8 @@ diff -u libmagic.origin/ascmagic.c libmagic/ascmagic.c
return rv;
}
diff -u libmagic.origin/cdf.c libmagic/cdf.c
--- libmagic.origin/cdf.c Mon Feb 20 23:35:29 2012
diff -u libmagic.orig/cdf.c libmagic/cdf.c
--- libmagic.orig/cdf.c Mon Feb 20 23:35:29 2012
+++ libmagic/cdf.c Tue Apr 10 09:46:33 2012
@@ -43,7 +43,17 @@
#include <err.h>
@@ -883,8 +887,8 @@ diff -u libmagic.origin/cdf.c libmagic/cdf.c
cdf_print_elapsed_time(buf, sizeof(buf), tp);
(void)fprintf(stderr, "timestamp %s\n", buf);
} else {
diff -u libmagic.origin/cdf.h libmagic/cdf.h
--- libmagic.origin/cdf.h Fri Feb 17 06:28:31 2012
diff -u libmagic.orig/cdf.h libmagic/cdf.h
--- libmagic.orig/cdf.h Fri Feb 17 06:28:31 2012
+++ libmagic/cdf.h Tue Apr 10 09:46:34 2012
@@ -35,7 +35,7 @@
#ifndef _H_CDF_
@@ -921,8 +925,8 @@ diff -u libmagic.origin/cdf.h libmagic/cdf.h
int cdf_read_header(const cdf_info_t *, cdf_header_t *);
void cdf_swap_header(cdf_header_t *);
void cdf_unpack_header(cdf_header_t *, char *);
diff -u libmagic.origin/cdf_time.c libmagic/cdf_time.c
--- libmagic.origin/cdf_time.c Tue Dec 13 14:48:41 2011
diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c
--- libmagic.orig/cdf_time.c Tue Dec 13 14:48:41 2011
+++ libmagic/cdf_time.c Tue Apr 10 09:46:34 2012
@@ -96,7 +96,7 @@
}
@@ -980,8 +984,8 @@ diff -u libmagic.origin/cdf_time.c libmagic/cdf_time.c
static const cdf_timestamp_t tst = 0x01A5E403C2D59C00ULL;
static const char *ref = "Sat Apr 23 01:30:00 1977";
char *p, *q;
diff -u libmagic.origin/compress.c libmagic/compress.c
--- libmagic.origin/compress.c Sat Dec 17 18:17:18 2011
diff -u libmagic.orig/compress.c libmagic/compress.c
--- libmagic.orig/compress.c Sat Dec 17 18:17:18 2011
+++ libmagic/compress.c Tue Apr 10 09:46:34 2012
@@ -32,6 +32,7 @@
* uncompress(method, old, n, newch) - uncompress old into new,
@@ -1143,8 +1147,8 @@ diff -u libmagic.origin/compress.c libmagic/compress.c
}
-#endif
+#endif /* if PHP_FILEINFO_UNCOMPRESS */
diff -u libmagic.origin/file.h libmagic/file.h
--- libmagic.origin/file.h Tue Sep 20 17:30:14 2011
diff -u libmagic.orig/file.h libmagic/file.h
--- libmagic.orig/file.h Tue Sep 20 17:30:14 2011
+++ libmagic/file.h Mon Apr 23 17:58:54 2012
@@ -33,11 +33,9 @@
#ifndef __file_h__
@@ -1318,8 +1322,8 @@ diff -u libmagic.origin/file.h libmagic/file.h
#endif
#endif /* __file_h__ */
diff -u libmagic.origin/fsmagic.c libmagic/fsmagic.c
--- libmagic.origin/fsmagic.c Tue Aug 23 10:57:10 2011
diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c
--- libmagic.orig/fsmagic.c Tue Aug 23 10:57:10 2011
+++ libmagic/fsmagic.c Tue Apr 10 09:46:34 2012
@@ -59,27 +59,21 @@
# define minor(dev) ((dev) & 0xff)
@@ -1643,8 +1647,8 @@ diff -u libmagic.origin/fsmagic.c libmagic/fsmagic.c
}
/*
diff -u libmagic.origin/funcs.c libmagic/funcs.c
--- libmagic.origin/funcs.c Sat Dec 17 18:17:18 2011
diff -u libmagic.orig/funcs.c libmagic/funcs.c
--- libmagic.orig/funcs.c Sat Dec 17 18:17:18 2011
+++ libmagic/funcs.c Mon Apr 23 17:58:54 2012
@@ -41,52 +41,42 @@
#if defined(HAVE_WCTYPE_H)
@@ -1939,8 +1943,8 @@ diff -u libmagic.origin/funcs.c libmagic/funcs.c
+ return rep_cnt;
}
+
diff -u libmagic.origin/magic.c libmagic/magic.c
--- libmagic.origin/magic.c Thu May 26 03:27:59 2011
diff -u libmagic.orig/magic.c libmagic/magic.c
--- libmagic.orig/magic.c Thu May 26 03:27:59 2011
+++ libmagic/magic.c Tue Apr 10 09:46:34 2012
@@ -25,11 +25,6 @@
* SUCH DAMAGE.
@@ -2317,8 +2321,8 @@ diff -u libmagic.origin/magic.c libmagic/magic.c
public const char *
magic_error(struct magic_set *ms)
diff -u libmagic.origin/magic.h libmagic/magic.h
--- libmagic.origin/magic.h Sun Dec 18 15:54:43 2011
diff -u libmagic.orig/magic.h libmagic/magic.h
--- libmagic.orig/magic.h Sun Dec 18 15:54:43 2011
+++ libmagic/magic.h Tue Apr 10 09:46:34 2012
@@ -85,6 +85,7 @@
@@ -2336,9 +2340,9 @@ diff -u libmagic.origin/magic.h libmagic/magic.h
int magic_list(magic_t, const char *);
int magic_errno(magic_t);
diff -u libmagic.origin/print.c libmagic/print.c
--- libmagic.origin/print.c Tue Sep 20 17:28:09 2011
+++ libmagic/print.c Tue Oct 16 10:13:39 2012
diff -u libmagic.orig/print.c libmagic/print.c
--- libmagic.orig/print.c Tue Sep 20 17:28:09 2011
+++ libmagic/print.c Tue Nov 27 16:34:56 2012
@@ -29,12 +29,16 @@
* print.c - debugging printout routines
*/
@@ -2538,8 +2542,8 @@ diff -u libmagic.origin/print.c libmagic/print.c
}
protected const char *
diff -u libmagic.origin/readcdf.c libmagic/readcdf.c
--- libmagic.origin/readcdf.c Mon Feb 20 21:04:58 2012
diff -u libmagic.orig/readcdf.c libmagic/readcdf.c
--- libmagic.orig/readcdf.c Mon Feb 20 21:04:58 2012
+++ libmagic/readcdf.c Tue Apr 10 09:46:34 2012
@@ -30,7 +30,11 @@
#endif
@@ -2586,8 +2590,8 @@ diff -u libmagic.origin/readcdf.c libmagic/readcdf.c
c = cdf_ctime(&ts.tv_sec);
if ((ec = strchr(c, '\n')) != NULL)
*ec = '\0';
diff -u libmagic.origin/readelf.c libmagic/readelf.c
--- libmagic.origin/readelf.c Tue Aug 23 10:57:10 2011
diff -u libmagic.orig/readelf.c libmagic/readelf.c
--- libmagic.orig/readelf.c Tue Aug 23 10:57:10 2011
+++ libmagic/readelf.c Tue Apr 10 09:46:34 2012
@@ -49,7 +49,7 @@
off_t, int *, int);
@@ -2743,8 +2747,8 @@ diff -u libmagic.origin/readelf.c libmagic/readelf.c
fd = file_pipe2file(ms, fd, buf, nbytes);
if (fstat(fd, &st) == -1) {
diff -u libmagic.origin/softmagic.c libmagic/softmagic.c
--- libmagic.origin/softmagic.c Sat Dec 17 18:17:18 2011
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
--- libmagic.orig/softmagic.c Sat Dec 17 18:17:18 2011
+++ libmagic/softmagic.c Fri May 25 09:59:25 2012
@@ -41,6 +41,11 @@
#include <stdlib.h>
+4
View File
@@ -2407,7 +2407,11 @@ mkdbname(struct magic_set *ms, const char *fn, int strip)
/* Compatibility with old code that looked in .mime */
if (ms->flags & MAGIC_MIME) {
spprintf(&buf, MAXPATHLEN, "%.*s.mime%s", (int)(q - fn), fn, ext);
#ifdef PHP_WIN32
if (VCWD_ACCESS(buf, R_OK) == 0) {
#else
if (VCWD_ACCESS(buf, R_OK) != -1) {
#endif
ms->flags &= MAGIC_MIME_TYPE;
return buf;
}
@@ -1,36 +0,0 @@
--TEST--
Test finfo_file() function : regex rules
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');
if (substr(PHP_OS, 0, 3) != 'WIN') {
die('skip.. only for Windows');
}
?>
--FILE--
<?php
/**
* Works with the unix file command:
* $ file -m magic resources/test.awk
* resources/test.awk: awk script, ASCII text
*/
$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
$finfo = finfo_open( FILEINFO_MIME, $magicFile );
echo "*** Testing finfo_file() : regex rules ***\n";
// Calling finfo_file() with all possible arguments
$file = __DIR__ . '/resources/test.awk';
var_dump( finfo_file( $finfo, $file ) );
var_dump( finfo_file( $finfo, $file, FILEINFO_CONTINUE ) );
// Windows uses libfileinfo 1.0.5-dev
// this may be causing the slightly different output from the first
// finfo_file() call
?>
===DONE===
--EXPECTF--
*** Testing finfo_file() : regex rules ***
string(10) "text/plain"
string(22) "awk script, ASCII text"
===DONE===
-3
View File
@@ -2,9 +2,6 @@
Test finfo_file() function : regex rules
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. only for Non Windows Systems');
}
?>
--FILE--
<?php
@@ -1,53 +0,0 @@
--TEST--
Test finfo_open() function : error functionality
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');
if(substr(PHP_OS, 0, 3) != 'WIN' )
die("skip Not Valid for Linux");
?>
--FILE--
<?php
/* Prototype : resource finfo_open([int options [, string arg]])
* Description: Create a new fileinfo resource.
* Source code: ext/fileinfo/fileinfo.c
* Alias to functions:
*/
$magicFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'magic';
echo "*** Testing finfo_open() : error functionality ***\n";
// on 5_4, this line generates additional warning messages that 5_3 does not. functionally, it should be fine (should pass)
var_dump( finfo_open( FILEINFO_MIME, 'foobarfile' ) );
var_dump( finfo_open( array(), $magicFile ) );
var_dump( finfo_open( FILEINFO_MIME, $magicFile, 'extraArg' ) );
var_dump( finfo_open( PHP_INT_MAX - 1, $magicFile ) );
var_dump( finfo_open( 'foobar' ) );
var_dump( new finfo('foobar') );
?>
===DONE===
--EXPECTF--
*** Testing finfo_open() : error functionality ***
Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %sfinfo_open_error-win32.php on line %d
Warning: finfo_open(%sfoobarfile): failed to open stream: No such file or directory in %sfinfo_open_error-win32.php on line %d
Warning: finfo_open(): Failed to load magic database at '%sfoobarfile'. in %sfinfo_open_error-win32.php on line %d
bool(false)
Warning: finfo_open() expects parameter 1 to be long, array given in %sfinfo_open_error-win32.php on line %d
bool(false)
Warning: finfo_open() expects at most 2 parameters, 3 given in %sfinfo_open_error-win32.php on line %d
bool(false)
resource(6) of type (file_info)
Warning: finfo_open() expects parameter 1 to be long, string given in %sfinfo_open_error-win32.php on line %d
bool(false)
Warning: finfo::finfo() expects parameter 1 to be long, string given in %sfinfo_open_error-win32.php on line %d
NULL
===DONE===
-3
View File
@@ -2,9 +2,6 @@
Test finfo_open() function : error functionality
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc');
if(substr(PHP_OS, 0, 3) == 'WIN' )
die("skip Not Valid for Windows");
?>
--FILE--
<?php
/* Prototype : resource finfo_open([int options [, string arg]])
+4 -2
View File
@@ -109,8 +109,10 @@
if (len < 1 && return_if_empty) { \
RETURN_VALIDATION_FAILED \
} \
while (p[len-1] == ' ' || p[len-1] == '\t' || p[len-1] == '\r' || p[len-1] == '\v' || p[len-1] == '\n') { \
len--; \
if (len > 0) { \
while (p[len-1] == ' ' || p[len-1] == '\t' || p[len-1] == '\r' || p[len-1] == '\v' || p[len-1] == '\n') { \
len--; \
} \
} \
}
+1 -1
View File
@@ -1191,7 +1191,7 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
if (zend_hash_index_find(Z_ARRVAL_PP(disabled_auth_method), i, (void **) &z_auth_method) == SUCCESS) {
if (Z_TYPE_PP(z_auth_method) == IS_STRING) {
if (Z_STRLEN_PP(z_auth_method) > 1) {
mail_parameters (NIL, DISABLE_AUTHENTICATOR, (void *)Z_STRVAL_PP(disabled_auth_method));
mail_parameters (NIL, DISABLE_AUTHENTICATOR, (void *)Z_STRVAL_PP(z_auth_method));
}
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid argument, expect string or array of strings");
+52
View File
@@ -0,0 +1,52 @@
--TEST--
imap_open() DISABLE_AUTHENTICATOR ignores array param
--SKIPIF--
<?php
extension_loaded('imap') or die('skip imap extension not available in this build');
require_once(dirname(__FILE__).'/imap_include.inc');
$in = imap_open($default_mailbox, $username, $password, OP_HALFOPEN, 1);
if (!$in) {
die("skip could not connect to mailbox $default_mailbox");
}
$kerberos = false;
if (is_array($errors = imap_errors())) {
foreach ($errors as $err) {
if (strstr($err, 'GSSAPI') || strstr($err, 'Kerberos')) {
$kerberos = true;
}
}
}
if (!$kerberos) {
die("skip need a GSSAPI/Kerberos aware server");
}
?>
--FILE--
<?php
$tests = array(
'Array' => array('DISABLE_AUTHENTICATOR' => array('GSSAPI','NTLM')),
'String' => array('DISABLE_AUTHENTICATOR' => 'GSSAPI'),
);
require_once(dirname(__FILE__).'/imap_include.inc');
foreach ($tests as $name => $testparams) {
echo "Test for $name\n";
$in = imap_open($default_mailbox, $username, $password, OP_HALFOPEN, 1, $testparams);
if ($in) {
if (is_array($errors = imap_errors())) {
foreach ($errors as $err) {
if (strstr($err, 'GSSAPI') || strstr($err, 'Kerberos')) {
echo "$err\n";
}
}
}
} else {
echo "Can't connect\n";
}
}
echo "Done\n";
?>
--EXPECTF--
Test for Array
Test for String
Done
+1 -1
View File
@@ -9,7 +9,7 @@ if test "$PHP_JSON" != "no"; then
AC_DEFINE([HAVE_JSON],1 ,[whether to enable JavaScript Object Serialization support])
AC_HEADER_STDC
PHP_NEW_EXTENSION(json, json.c utf8_to_utf16.c utf8_decode.c JSON_parser.c, $ext_shared)
PHP_NEW_EXTENSION(json, json.c utf8_decode.c JSON_parser.c, $ext_shared)
PHP_INSTALL_HEADERS([ext/json], [php_json.h])
PHP_SUBST(JSON_SHARED_LIBADD)
fi
+1 -1
View File
@@ -5,7 +5,7 @@ ARG_ENABLE("json", "JavaScript Object Serialization support", "yes");
if (PHP_JSON != "no") {
EXTENSION('json', 'json.c', PHP_JSON_SHARED, "");
ADD_SOURCES(configure_module_dirname, "JSON_parser.c utf8_decode.c utf8_to_utf16.c", "json");
ADD_SOURCES(configure_module_dirname, "JSON_parser.c utf8_decode.c", "json");
PHP_INSTALL_HEADERS("ext/json/", "php_json.h");
}
+44 -13
View File
@@ -25,8 +25,8 @@
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "ext/standard/html.h"
#include "ext/standard/php_smart_str.h"
#include "utf8_to_utf16.h"
#include "JSON_parser.h"
#include "php_json.h"
#include <zend_exceptions.h>
@@ -344,7 +344,43 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
}
/* }}} */
#define REVERSE16(us) (((us & 0xf) << 12) | (((us >> 4) & 0xf) << 8) | (((us >> 8) & 0xf) << 4) | ((us >> 12) & 0xf))
static int json_utf8_to_utf16(unsigned short *utf16, char utf8[], int len) /* {{{ */
{
size_t pos = 0, us;
int j, status;
if (utf16) {
/* really convert the utf8 string */
for (j=0 ; pos < len ; j++) {
us = php_next_utf8_char((const unsigned char *)utf8, len, &pos, &status);
if (status != SUCCESS) {
return -1;
}
/* From http://en.wikipedia.org/wiki/UTF16 */
if (us >= 0x10000) {
us -= 0x10000;
utf16[j++] = (unsigned short)((us >> 10) | 0xd800);
utf16[j] = (unsigned short)((us & 0x3ff) | 0xdc00);
} else {
utf16[j] = (unsigned short)us;
}
}
} else {
/* Only check if utf8 string is valid, and compute utf16 lenght */
for (j=0 ; pos < len ; j++) {
us = php_next_utf8_char((const unsigned char *)utf8, len, &pos, &status);
if (status != SUCCESS) {
return -1;
}
if (us >= 0x10000) {
j++;
}
}
}
return j;
}
/* }}} */
static void json_escape_string(smart_str *buf, char *s, int len, int options TSRMLS_DC) /* {{{ */
{
@@ -383,7 +419,7 @@ static void json_escape_string(smart_str *buf, char *s, int len, int options TSR
}
utf16 = (options & PHP_JSON_UNESCAPED_UNICODE) ? NULL : (unsigned short *) safe_emalloc(len, sizeof(unsigned short), 0);
ulen = utf8_to_utf16(utf16, s, len);
ulen = json_utf8_to_utf16(utf16, s, len);
if (ulen <= 0) {
if (utf16) {
efree(utf16);
@@ -490,15 +526,10 @@ static void json_escape_string(smart_str *buf, char *s, int len, int options TSR
smart_str_appendc(buf, (unsigned char) us);
} else {
smart_str_appendl(buf, "\\u", 2);
us = REVERSE16(us);
smart_str_appendc(buf, digits[us & ((1 << 4) - 1)]);
us >>= 4;
smart_str_appendc(buf, digits[us & ((1 << 4) - 1)]);
us >>= 4;
smart_str_appendc(buf, digits[us & ((1 << 4) - 1)]);
us >>= 4;
smart_str_appendc(buf, digits[us & ((1 << 4) - 1)]);
smart_str_appendc(buf, digits[(us & 0xf000) >> 12]);
smart_str_appendc(buf, digits[(us & 0xf00) >> 8]);
smart_str_appendc(buf, digits[(us & 0xf0) >> 4]);
smart_str_appendc(buf, digits[(us & 0xf)]);
}
break;
}
@@ -628,7 +659,7 @@ PHP_JSON_API void php_json_decode_ex(zval *return_value, char *str, int str_len,
utf16 = (unsigned short *) safe_emalloc((str_len+1), sizeof(unsigned short), 1);
utf16_len = utf8_to_utf16(utf16, str, str_len);
utf16_len = json_utf8_to_utf16(utf16, str, str_len);
if (utf16_len <= 0) {
if (utf16) {
efree(utf16);
-59
View File
@@ -1,59 +0,0 @@
/* utf8_to_utf16.c */
/* 2005-12-25 */
/*
Copyright (c) 2005 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The Software shall be used for Good, not Evil.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#include "utf8_to_utf16.h"
#include "utf8_decode.h"
int
utf8_to_utf16(unsigned short *w, char p[], int length)
{
int c;
int the_index = 0;
json_utf8_decode utf8;
utf8_decode_init(&utf8, p, length);
for (;;) {
c = utf8_decode_next(&utf8);
if (c < 0) {
return (c == UTF8_END) ? the_index : UTF8_ERROR;
}
if (c < 0x10000) {
if (w) {
w[the_index] = (unsigned short)c;
}
the_index += 1;
} else {
c -= 0x10000;
if (w) {
w[the_index] = (unsigned short)(0xD800 | (c >> 10));
w[the_index + 1] = (unsigned short)(0xDC00 | (c & 0x3FF));
}
the_index += 2;
}
}
}
-3
View File
@@ -1,3 +0,0 @@
/* utf8_to_utf16.h */
extern int utf8_to_utf16(unsigned short *w, char p[], int length);
+1 -2
View File
@@ -860,7 +860,6 @@ static PHP_MSHUTDOWN_FUNCTION(libxml)
{
if (!_php_libxml_per_request_initialization) {
xmlSetGenericErrorFunc(NULL, NULL);
xmlSetStructuredErrorFunc(NULL, NULL);
xmlParserInputBufferCreateFilenameDefault(NULL);
xmlOutputBufferCreateFilenameDefault(NULL);
@@ -876,11 +875,11 @@ static int php_libxml_post_deactivate()
/* reset libxml generic error handling */
if (_php_libxml_per_request_initialization) {
xmlSetGenericErrorFunc(NULL, NULL);
xmlSetStructuredErrorFunc(NULL, NULL);
xmlParserInputBufferCreateFilenameDefault(NULL);
xmlOutputBufferCreateFilenameDefault(NULL);
}
xmlSetStructuredErrorFunc(NULL, NULL);
if (LIBXML(stream_context)) {
/* the steam_context resource will be released by resource list destructor */
+3
View File
@@ -81,5 +81,8 @@ if test "$PHP_MYSQLI" != "no"; then
if test "$PHP_MYSQLI" = "yes" || test "$PHP_MYSQLI" = "mysqlnd"; then
PHP_ADD_EXTENSION_DEP(mysqli, mysqlnd)
AC_DEFINE([MYSQLI_USE_MYSQLND], 1, [Whether mysqlnd is enabled])
PHP_INSTALL_HEADERS([ext/mysqli/mysqli_mysqlnd.h])
else
PHP_INSTALL_HEADERS([ext/mysqli/mysqli_libmysql.h])
fi
fi
+8 -2
View File
@@ -683,7 +683,7 @@ static int mysqlnd_zval_array_from_mysqlnd_array(MYSQLND **in_array, zval *out_a
MYSQLND **p = in_array;
HashTable *new_hash;
zval **elem, **dest_elem;
int ret = 0;
int ret = 0, i = 0;
ALLOC_HASHTABLE(new_hash);
zend_hash_init(new_hash, zend_hash_num_elements(Z_ARRVAL_P(out_array)), NULL, ZVAL_PTR_DTOR, 0);
@@ -692,13 +692,19 @@ static int mysqlnd_zval_array_from_mysqlnd_array(MYSQLND **in_array, zval *out_a
zend_hash_get_current_data(Z_ARRVAL_P(out_array), (void **) &elem) == SUCCESS;
zend_hash_move_forward(Z_ARRVAL_P(out_array)))
{
i++;
if (Z_TYPE_PP(elem) != IS_OBJECT || !instanceof_function(Z_OBJCE_PP(elem), mysqli_link_class_entry TSRMLS_CC)) {
continue;
}
{
MY_MYSQL *mysql;
MYSQLI_RESOURCE *my_res;
mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*elem TSRMLS_CC);
mysql = (MY_MYSQL *) ((MYSQLI_RESOURCE *)intern->ptr)->ptr;
if (!(my_res = (MYSQLI_RESOURCE *)intern->ptr)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "[%d] Couldn't fetch %s", i, intern->zo.ce->name);
continue;
}
mysql = (MY_MYSQL *) my_res->ptr;
if (mysql->mysql == *p) {
zend_hash_next_index_insert(new_hash, (void *)elem, sizeof(zval *), (void **)&dest_elem);
if (dest_elem) {
+34
View File
@@ -0,0 +1,34 @@
--TEST--
Bug #63398 (Segfault when polling closed link)
--SKIPIF--
<?php
require_once('skipif.inc');
require_once("connect.inc");
if (!$IS_MYSQLND) {
die("skip mysqlnd only test");
}
?>
--FILE--
<?php
$link = new mysqli('localhost', 'test', NULL, 'test');
mysqli_close($link);
$read = $error = $reject = array();
$read[] = $error[] = $reject[] = $link;
mysqli_poll($read, $error, $reject, 1);
echo "okey";
?>
--EXPECTF--
Warning: mysqli_poll(): [1] Couldn't fetch mysqli in %sbug63398.php on line %d
Warning: mysqli_poll(): [1] Couldn't fetch mysqli in %sbug63398.php on line %d
Warning: mysqli_poll(): No stream arrays were passed in %sbug63398.php on line %d
Warning: mysqli_poll(): [1] Couldn't fetch mysqli in %sbug63398.php on line %d
Warning: mysqli_poll(): [1] Couldn't fetch mysqli in %sbug63398.php on line %d
okey
+1 -1
View File
@@ -1866,7 +1866,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match, 0, 0, 2)
ZEND_ARG_INFO(0, offset)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match_all, 0, 0, 3)
ZEND_BEGIN_ARG_INFO_EX(arginfo_preg_match_all, 0, 0, 2)
ZEND_ARG_INFO(0, pattern)
ZEND_ARG_INFO(0, subject)
ZEND_ARG_INFO(1, subpatterns) /* array */
@@ -9,6 +9,9 @@ if (!in_array('SHA-256', $arr)) die("skip hash extension loaded shared"); ?>
--INI--
phar.require_hash=0
phar.readonly=0
--ENV--
TEMP=.
TMP=.
--FILE--
<?php
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.tar';
+1 -1
View File
@@ -1884,7 +1884,7 @@ ZEND_METHOD(reflection_function, getStaticVariables)
/* Return an empty array in case no static variables exist */
array_init(return_value);
if (fptr->type == ZEND_USER_FUNCTION && fptr->op_array.static_variables != NULL) {
zend_hash_apply_with_argument(fptr->op_array.static_variables, (apply_func_arg_t) zval_update_constant, (void*)1 TSRMLS_CC);
zend_hash_apply_with_argument(fptr->op_array.static_variables, (apply_func_arg_t) zval_update_constant_inline_change, fptr->common.scope TSRMLS_CC);
zend_hash_copy(Z_ARRVAL_P(return_value), fptr->op_array.static_variables, (copy_ctor_func_t) zval_add_ref, (void *) &tmp_copy, sizeof(zval *));
}
}
+41
View File
@@ -0,0 +1,41 @@
--TEST--
Bug #63614 (Fatal error on Reflection)
--FILE--
<?php
function dummy() {
static $a = array();
}
class Test
{
const A = 0;
public function func()
{
static $a = array(
self::A => 'a'
);
}
}
$reflect = new ReflectionFunction("dummy");
print_r($reflect->getStaticVariables());
$reflect = new ReflectionMethod('Test', 'func');
print_r($reflect->getStaticVariables());
?>
--EXPECT--
Array
(
[a] => Array
(
)
)
Array
(
[a] => Array
(
[0] => a
)
)
+3 -21
View File
@@ -463,19 +463,6 @@ zend_module_entry soap_module_entry = {
ZEND_GET_MODULE(soap)
#endif
ZEND_INI_MH(OnUpdateCacheEnabled)
{
if (OnUpdateBool(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC) == FAILURE) {
return FAILURE;
}
if (SOAP_GLOBAL(cache_enabled)) {
SOAP_GLOBAL(cache) = SOAP_GLOBAL(cache_mode);
} else {
SOAP_GLOBAL(cache) = 0;
}
return SUCCESS;
}
ZEND_INI_MH(OnUpdateCacheMode)
{
char *p;
@@ -489,16 +476,11 @@ ZEND_INI_MH(OnUpdateCacheMode)
*p = (char)atoi(new_value);
if (SOAP_GLOBAL(cache_enabled)) {
SOAP_GLOBAL(cache) = SOAP_GLOBAL(cache_mode);
} else {
SOAP_GLOBAL(cache) = 0;
}
return SUCCESS;
}
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("soap.wsdl_cache_enabled", "1", PHP_INI_ALL, OnUpdateCacheEnabled,
STD_PHP_INI_ENTRY("soap.wsdl_cache_enabled", "1", PHP_INI_ALL, OnUpdateBool,
cache_enabled, zend_soap_globals, soap_globals)
STD_PHP_INI_ENTRY("soap.wsdl_cache_dir", "/tmp", PHP_INI_ALL, OnUpdateString,
cache_dir, zend_soap_globals, soap_globals)
@@ -1102,7 +1084,7 @@ PHP_METHOD(SoapServer, SoapServer)
memset(service, 0, sizeof(soapService));
service->send_errors = 1;
cache_wsdl = SOAP_GLOBAL(cache);
cache_wsdl = SOAP_GLOBAL(cache_enabled) ? SOAP_GLOBAL(cache_mode) : 0;
if (options != NULL) {
HashTable *ht = Z_ARRVAL_P(options);
@@ -2318,7 +2300,7 @@ PHP_METHOD(SoapClient, SoapClient)
php_error_docref(NULL TSRMLS_CC, E_ERROR, "$wsdl must be string or null");
}
cache_wsdl = SOAP_GLOBAL(cache);
cache_wsdl = SOAP_GLOBAL(cache_enabled) ? SOAP_GLOBAL(cache_mode) : 0;
if (options != NULL) {
HashTable *ht = Z_ARRVAL_P(options);
+3
View File
@@ -788,6 +788,9 @@ PHP_MINIT_FUNCTION(sockets)
#endif
REGISTER_LONG_CONSTANT("SO_DEBUG", SO_DEBUG, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SO_REUSEADDR", SO_REUSEADDR, CONST_CS | CONST_PERSISTENT);
#ifdef SO_REUSEPORT
REGISTER_LONG_CONSTANT("SO_REUSEPORT", SO_REUSEPORT, CONST_CS | CONST_PERSISTENT);
#endif
REGISTER_LONG_CONSTANT("SO_KEEPALIVE", SO_KEEPALIVE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SO_DONTROUTE", SO_DONTROUTE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SO_LINGER", SO_LINGER, CONST_CS | CONST_PERSISTENT);
+15
View File
@@ -0,0 +1,15 @@
--TEST--
Bug #49341: add SO_REUSEPORT support for socket_set_option()
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
if (PHP_OS !== 'Darwin' && false === strpos(PHP_OS, 'BSD')) {
die('is not *BSD.');
}
--FILE--
<?php
var_dump(defined('SO_REUSEPORT'));
--EXPECTF--
bool(true)
+3
View File
@@ -50,6 +50,9 @@ if test $PHP_SQLITE3 != "no"; then
PHP_CHECK_LIBRARY(sqlite3,sqlite3_key,[
AC_DEFINE(HAVE_SQLITE3_KEY, 1, [have commercial sqlite3 with crypto support])
])
PHP_CHECK_LIBRARY(sqlite3,sqlite3_column_table_name,[
AC_DEFINE(SQLITE_ENABLE_COLUMN_METADATA, 1, [have sqlite3 with column metadata enabled])
])
PHP_CHECK_LIBRARY(sqlite3,sqlite3_load_extension,
[],
+1 -1
View File
@@ -15,7 +15,7 @@ $ini = parse_ini_string("ini=\r\niniraw", null, INI_SCANNER_RAW);
var_dump($ini['ini']);
--EXPECTF--
string(7) "ini;raw"
string(8) ""ini;raw"
string(4) ""ini"
string(3) "ini"
string(7) "ini"raw"
string(0) ""
+33
View File
@@ -0,0 +1,33 @@
--TEST--
Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes from value).
--FILE--
<?php
$array = parse_ini_string('
int = 123
constant = INSTALL_ROOT
quotedString = "string"
a = INSTALL_ROOT "waa"
b = "INSTALL_ROOT"
c = "waa" INSTALL_ROOT
d = INSTALL_ROOT "INSTALL_ROOT"', false, INI_SCANNER_RAW);
var_dump($array);
--EXPECTF--
array(7) {
["int"]=>
string(3) "123"
["constant"]=>
string(12) "INSTALL_ROOT"
["quotedString"]=>
string(6) "string"
["a"]=>
string(18) "INSTALL_ROOT "waa""
["b"]=>
string(12) "INSTALL_ROOT"
["c"]=>
string(18) ""waa" INSTALL_ROOT"
["d"]=>
string(27) "INSTALL_ROOT "INSTALL_ROOT""
}
@@ -2,6 +2,11 @@
Test lstat() and stat() functions: usage variations - invalid filenames
--CREDITS--
Dave Kelsey <d_kelsey@uk.ibm.com>
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip ... not for Windows');
}
--FILE--
<?php
/* Prototype: array lstat ( string $filename );
@@ -46,4 +51,4 @@ bool(false)
Warning: lstat(): Lstat failed for | in %s on line %d
bool(false)
Done
Done
-2
View File
@@ -297,7 +297,6 @@ PHPAPI int php_output_clean(TSRMLS_D)
php_output_context context;
if (OG(active) && (OG(active)->flags & PHP_OUTPUT_HANDLER_CLEANABLE)) {
OG(active)->buffer.used = 0;
php_output_context_init(&context, PHP_OUTPUT_HANDLER_CLEAN TSRMLS_CC);
php_output_handler_op(OG(active), &context);
php_output_context_dtor(&context);
@@ -1226,7 +1225,6 @@ static inline int php_output_stack_pop(int flags TSRMLS_DC)
/* signal that we're cleaning up */
if (flags & PHP_OUTPUT_POP_DISCARD) {
context.op |= PHP_OUTPUT_HANDLER_CLEAN;
orphan->buffer.used = 0;
}
php_output_handler_op(orphan, &context);
}
+4 -4
View File
@@ -2,7 +2,7 @@
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 5
#define PHP_MINOR_VERSION 4
#define PHP_RELEASE_VERSION 9
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "5.4.9-dev"
#define PHP_VERSION_ID 50409
#define PHP_RELEASE_VERSION 10
#define PHP_EXTRA_VERSION ""
#define PHP_VERSION "5.4.10"
#define PHP_VERSION_ID 50410
+10 -10
View File
@@ -38,21 +38,21 @@ if (PHP_APACHE2_2HANDLER != "no") {
}
}
ARG_ENABLE('apache2-3handler', 'Build Apache 2.3.x handler', 'no');
if (PHP_APACHE2_3HANDLER != "no") {
ARG_ENABLE('apache2-4handler', 'Build Apache 2.4.x handler', 'no');
if (PHP_APACHE2_4HANDLER != "no") {
if (PHP_ZTS == "no") {
WARNING("Apache 2.3 module requires an --enable-zts build of PHP on windows");
} else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_3HANDLER", PHP_PHP_BUILD + "\\include\\apache2_3") &&
CHECK_LIB("libhttpd.lib", "apache2_3handler", PHP_PHP_BUILD + "\\lib\\apache2_3") &&
CHECK_LIB("libapr-1.lib", "apache2_3handler", PHP_PHP_BUILD + "\\lib\\apache2_3") &&
CHECK_LIB("libaprutil-1.lib", "apache2_3handler", PHP_PHP_BUILD + "\\lib\\apache2_3")
WARNING("Apache 2.4 module requires an --enable-zts build of PHP on windows");
} else if (CHECK_HEADER_ADD_INCLUDE("httpd.h", "CFLAGS_APACHE2_4HANDLER", PHP_PHP_BUILD + "\\include\\apache2_4") &&
CHECK_LIB("libhttpd.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") &&
CHECK_LIB("libapr-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4") &&
CHECK_LIB("libaprutil-1.lib", "apache2_4handler", PHP_PHP_BUILD + "\\lib\\apache2_4")
) {
SAPI('apache2_3handler', 'mod_php5.c sapi_apache2.c apache_config.c php_functions.c',
'php' + PHP_VERSION + 'apache2_3.dll',
SAPI('apache2_4handler', 'mod_php5.c sapi_apache2.c apache_config.c php_functions.c',
'php' + PHP_VERSION + 'apache2_4.dll',
'/D PHP_APACHE2_EXPORTS /I win32',
'sapi\\apache2handler');
} else {
WARNING("Could not find apache2.3 libraries/headers");
WARNING("Could not find apache 2.4 libraries/headers");
}
}
+1 -1
View File
@@ -69,7 +69,7 @@ string(%d) "Extension [ <persistent> extension #%d pcre version <no_version> ] {
- Parameters [5] {
Parameter #0 [ <required> $pattern ]
Parameter #1 [ <required> $subject ]
Parameter #2 [ <required> &$subpatterns ]
Parameter #2 [ <optional> &$subpatterns ]
Parameter #3 [ <optional> $flags ]
Parameter #4 [ <optional> $offset ]
}
+6 -2
View File
@@ -188,7 +188,9 @@ static int fpm_event_queue_del(struct fpm_event_queue_s **queue, struct fpm_even
}
if (q == *queue) {
*queue = q->next;
(*queue)->prev = NULL;
if (*queue) {
(*queue)->prev = NULL;
}
}
/* ask the event module to remove the fd from its own queue */
@@ -432,7 +434,9 @@ void fpm_event_loop(int err) /* {{{ */
}
if (q == fpm_event_queue_timer) {
fpm_event_queue_timer = q->next;
fpm_event_queue_timer->prev = NULL;
if (fpm_event_queue_timer) {
fpm_event_queue_timer->prev = NULL;
}
}
q = q->next;
free(q2);
+4 -3
View File
@@ -96,7 +96,7 @@ int fpm_log_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
int fpm_log_write(char *log_format TSRMLS_DC) /* {{{ */
{
char *s, *b;
char buffer[FPM_LOG_BUFFER];
char buffer[FPM_LOG_BUFFER+1];
int token, test;
size_t len, len2;
struct fpm_scoreboard_proc_s proc, *proc_p;
@@ -146,9 +146,10 @@ int fpm_log_write(char *log_format TSRMLS_DC) /* {{{ */
s = log_format;
while (*s != '\0') {
if (len > FPM_LOG_BUFFER) {
/* Test is we have place for 1 more char. */
if (len >= FPM_LOG_BUFFER) {
zlog(ZLOG_NOTICE, "the log buffer is full (%d). The access log request has been truncated.", FPM_LOG_BUFFER);
len = FPM_LOG_BUFFER - 1;
len = FPM_LOG_BUFFER;
break;
}
+154
View File
@@ -0,0 +1,154 @@
--TEST--
Un-setting instance properties causes magic methods to be called when trying to access them from outside the magic
methods themselves.
--FILE--
<?php
class Test
{
public $publicProperty = 'publicProperty set';
protected $protectedProperty = 'protectedProperty set';
private $privateProperty = 'privateProperty set';
public function __get($name)
{
return '__get "' . $name . '"';
}
public function __set($name, $value)
{
$this->$name = $value;
echo '__set "' . $name . '" to "' . $value . '"';
}
public function __isset($name)
{
echo '__isset "' . $name . '"';
return isset($this->$name);
}
public function getPublicProperty()
{
return $this->publicProperty;
}
public function setPublicProperty($publicProperty)
{
$this->publicProperty = $publicProperty;
}
public function unsetProtectedProperty()
{
unset($this->protectedProperty);
}
public function getProtectedProperty()
{
return $this->protectedProperty;
}
public function setProtectedProperty($protectedProperty)
{
$this->protectedProperty = $protectedProperty;
}
public function unsetPrivateProperty()
{
unset($this->privateProperty);
}
public function getPrivateProperty()
{
return $this->privateProperty;
}
public function setPrivateProperty($privateProperty)
{
$this->privateProperty = $privateProperty;
}
}
// verifying public property
$o = new Test;
echo $o->publicProperty;
echo "\n";
var_export(isset($o->publicProperty));
echo "\n";
unset($o->publicProperty);
isset($o->publicProperty);
echo "\n";
echo $o->publicProperty;
echo "\n";
echo $o->getPublicProperty();
echo "\n";
echo $o->setPublicProperty('new publicProperty value via setter');
echo "\n";
echo $o->publicProperty;
echo "\n";
unset($o->publicProperty);
$o->publicProperty = 'new publicProperty value via public access';
echo "\n";
var_export(isset($o->publicProperty));
echo "\n";
echo $o->publicProperty;
echo "\n\n";
// verifying protected property
echo $o->getProtectedProperty();
echo "\n";
$o->unsetProtectedProperty();
var_export(isset($o->protectedProperty));
echo "\n";
echo $o->getProtectedProperty();
echo "\n";
echo $o->setProtectedProperty('new protectedProperty value via setter');
echo "\n";
var_export(isset($o->protectedProperty));
echo "\n";
echo $o->getProtectedProperty();
echo "\n\n";
// verifying private property
echo $o->getPrivateProperty();
echo "\n";
$o->unsetPrivateProperty();
var_export(isset($o->privateProperty));
echo "\n";
echo $o->getPrivateProperty();
echo "\n";
echo $o->setPrivateProperty('new privateProperty value via setter');
echo "\n";
var_export(isset($o->privateProperty));
echo "\n";
echo $o->getPrivateProperty();
echo "\n\n";
?>
--EXPECTF--
publicProperty set
true
__isset "publicProperty"
__get "publicProperty"
__get "publicProperty"
__set "publicProperty" to "new publicProperty value via setter"
new publicProperty value via setter
__set "publicProperty" to "new publicProperty value via public access"
true
new publicProperty value via public access
protectedProperty set
__isset "protectedProperty"__isset "protectedProperty"false
__get "protectedProperty"
__set "protectedProperty" to "new protectedProperty value via setter"
__isset "protectedProperty"true
new protectedProperty value via setter
privateProperty set
__isset "privateProperty"__isset "privateProperty"false
__get "privateProperty"
__set "privateProperty" to "new privateProperty value via setter"
__isset "privateProperty"true
new privateProperty value via setter
+2 -2
View File
@@ -27,8 +27,8 @@ Array
[0] => 1: yes
[1] => 4: !
[2] => 2:
[2] => 2: no
[3] => 0: yes!
[4] => 10:
[4] => 10: no
)
+3
View File
@@ -5,6 +5,9 @@ openbase_dir runtime tightning
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. only for unix');
}
if (!is_dir("/usr/local/bin")) {
die('skip.. no /usr/local/bin on this machine');
}
--INI--
open_basedir=/usr/local
--FILE--