mirror of
https://github.com/php/php-src.git
synced 2024-10-02 07:16:11 +00:00
Merge branch 'PHP-5.5' of https://git.php.net/push/php-src into PHP-5.5
* 'PHP-5.5' of https://git.php.net/push/php-src: (147 commits) Fixed bug #63186 (compile failure on netbsd) fix test for bug #60322 ensure the error_reporting level to get expected notice fixed tests missing tests for bug #53437 fixed EOL added closing ?> fix double entry Merge branch 'pull-request/341' Merge branch 'pull-request/341' Merge branch 'pull-request/341' split the test for 32 and 64 bit typo fixes (argument) typo fixes (accommodate, parameter) missing colon Backported the fix for bug #53437 Backported the fix for bug #53437 fixed the test Fix a BC breach related to bug #53437 Fixed bug #64988 (Class loading order affects E_STRICT warning) ...
This commit is contained in:
commit
0741697107
@ -147,7 +147,7 @@ STATUS: Working
|
||||
COMMENT: Tested on phpts and isapi versions
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysql
|
||||
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
PRIMARY MAINTAINER: Zak Greant <zak@mysql.com>, Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
-------------------------------------------------------------------------------
|
||||
@ -158,7 +158,7 @@ STATUS: Working
|
||||
SINCE: 5.0
|
||||
-------------------------------------------------------------------------------
|
||||
EXTENSION: mysqlnd
|
||||
PRIMARY MAINTAINER: Georg Richter <georg@php.net>, Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
PRIMARY MAINTAINER: Andrey Hristov <andrey@php.net>, Johannes Schlüter <johannes@php.net>, Ulf Wendel <uw@php.net>
|
||||
MAINTENANCE: Maintained
|
||||
STATUS: Working
|
||||
SINCE: 5.3
|
||||
|
100
NEWS
100
NEWS
@ -1,6 +1,85 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2013, PHP 5.5.0 Release Candidate 1
|
||||
?? ??? 2013, PHP 5.5.0 Release Candidate 4
|
||||
|
||||
- Core:
|
||||
. Fixed bug #64988 (Class loading order affects E_STRICT warning). (Laruence)
|
||||
. Fixed bug #64966 (segfault in zend_do_fcall_common_helper_SPEC). (Laruence)
|
||||
. Fixed bug #64934 (Apache2 TS crash with get_browser()). (Anatol)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #64997 (Segfault while using RecursiveIteratorIterator on
|
||||
64-bits systems). (Laruence)
|
||||
|
||||
06 Jun 2013, PHP 5.5.0 Release Candidate 3
|
||||
|
||||
- Core:
|
||||
. Fixed bug #64960 (Segfault in gc_zval_possible_root). (Laruence)
|
||||
. Fixed bug #64879 (Heap based buffer overflow in quoted_printable_encode,
|
||||
CVE 2013-2110). (Stas)
|
||||
|
||||
- FPM:
|
||||
. Fixed Bug #64915 (error_log ignored when daemonize=0). (Remi)
|
||||
|
||||
- GD:
|
||||
. Fixed Bug #64962 (imagerotate produces corrupted image). (Remi)
|
||||
. Fixed Bug #64961 (segfault in imagesetinterpolation). (Remi)
|
||||
|
||||
- Hash:
|
||||
. Fixed Bug #64745 (hash_pbkdf2() truncates data when using default length
|
||||
and hex output). (Anthony Ferrara)
|
||||
|
||||
- PDO_DBlib:
|
||||
. Fixed bug #63638 (Cannot connect to SQL Server 2008 with PDO dblib).
|
||||
(Stanley Sufficool)
|
||||
. Fixed bug #64338 (pdo_dblib can't connect to Azure SQL). (Stanley
|
||||
Sufficool)
|
||||
. Fixed bug #64808 (FreeTDS PDO getColumnMeta on a prepared but not executed
|
||||
statement crashes). (Stanley Sufficool)
|
||||
|
||||
- PDO_pgsql:
|
||||
. Fixed Bug #64949 (Buffer overflow in _pdo_pgsql_error). (Remi)
|
||||
|
||||
|
||||
23 May 2013, PHP 5.5.0 Release Candidate 2
|
||||
|
||||
- Core:
|
||||
. Fixed bug #64660 (Segfault on memory exhaustion within function definition).
|
||||
(Stas, reported by Juha Kylmänen)
|
||||
. Fixed bug #64720 (SegFault on zend_deactivate). (Dmitry)
|
||||
. Fixed bug #64853 (Use of no longer available ini directives causes crash
|
||||
on TS build). (Anatol)
|
||||
|
||||
- Calendar:
|
||||
. Fixed bug #64895 (Integer overflow in SndToJewish). (Remi)
|
||||
|
||||
- Fileinfo:
|
||||
. Fixed bug #64830 (mimetype detection segfaults on mp3 file). (Anatol)
|
||||
|
||||
- FPM:
|
||||
. Add --with-fpm-systemd option to report health to systemd, and
|
||||
systemd_interval option to configure this. The service can now use
|
||||
Type=notify in the systemd unit file. (Remi)
|
||||
|
||||
- mbstring:
|
||||
. Fixed bug #64769 (mbstring PHPTs crash on Windows x64). (Anatol)
|
||||
|
||||
- mysqli:
|
||||
. Fixed bug #64394 (MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS undeclared when
|
||||
using Connector/C). (Andrey)
|
||||
|
||||
- Sockets:
|
||||
. Fixed bug #64508 (Fails to build with --disable-ipv6). (Gustavo)
|
||||
|
||||
- Zend Engine:
|
||||
. Fixed bug #64821 (Custom Exceptions crash when internal properties overridden).
|
||||
(Anatol)
|
||||
|
||||
- DateTime
|
||||
. Fixed bug #64825 (Invalid free when unserializing DateTimeZone).
|
||||
(Anatol)
|
||||
|
||||
09 May 2013, PHP 5.5.0 Release Candidate 1
|
||||
|
||||
- FPM:
|
||||
. Ignore QUERY_STRING when sent in SCRIPT_FILENAME. (Remi)
|
||||
@ -8,6 +87,11 @@ PHP NEWS
|
||||
detected by code coverity scan. (Remi)
|
||||
. Log a warning when a syscall fails. (Remi)
|
||||
|
||||
- GD:
|
||||
. Fix build with system libgd >= 2.1 which is now the minimal
|
||||
version required (as build with previous version is broken).
|
||||
No change when bundled libgd is used. (Ondrej Sury, Remi)
|
||||
|
||||
- SNMP:
|
||||
. Fixed bug #64765 (Some IPv6 addresses get interpreted wrong).
|
||||
(Boris Lytochkin)
|
||||
@ -20,7 +104,7 @@ PHP NEWS
|
||||
25 Apr 2013, PHP 5.5.0 Beta 4
|
||||
|
||||
- Core:
|
||||
. Fixed bug #64677 (execution operator `` stealing surrounding arguments).
|
||||
. Fixed bug #64677 (execution operator `` stealing surrounding arguments).
|
||||
(Laruence)
|
||||
|
||||
- CURL:
|
||||
@ -39,13 +123,13 @@ PHP NEWS
|
||||
(Eric Iversen)
|
||||
|
||||
- Streams:
|
||||
. Fixed Windows x64 version of stream_socket_pair() and improved error handling
|
||||
(Anatol Belski)
|
||||
. Fixed Windows x64 version of stream_socket_pair() and improved error
|
||||
handling. (Anatol Belski)
|
||||
|
||||
11 Apr 2013, PHP 5.5.0 Beta 3
|
||||
|
||||
- Core:
|
||||
. Fixed bug #64578 (debug_backtrace in set_error_handler corrupts zend heap:
|
||||
. Fixed bug #64578 (debug_backtrace in set_error_handler corrupts zend heap:
|
||||
segfault). (Laruence)
|
||||
. Fixed bug #64565 (copy doesn't report failure on partial copy). (Remi)
|
||||
. Fixed bug #64555 (foreach no longer copies keys if they are interned).
|
||||
@ -63,7 +147,7 @@ PHP NEWS
|
||||
Kapelushnik, Derick)
|
||||
|
||||
- General improvements:
|
||||
. Drop support for bison < 2.4 when building PHP from GIT source.
|
||||
. Drop support for bison < 2.4 when building PHP from GIT source.
|
||||
(Laruence)
|
||||
|
||||
- Fileinfo:
|
||||
@ -101,7 +185,7 @@ PHP NEWS
|
||||
21 Mar 2013, PHP 5.5.0 Beta 1
|
||||
|
||||
- Core:
|
||||
. Added Zend Opcache extension and enable building it by default.
|
||||
. Added Zend Opcache extension and enable building it by default.
|
||||
More details here: https://wiki.php.net/rfc/optimizerplus. (Dmitry)
|
||||
. Added array_column function which returns a column in a multidimensional
|
||||
array. https://wiki.php.net/rfc/array_column. (Ben Ramsey)
|
||||
@ -209,7 +293,7 @@ PHP NEWS
|
||||
. Fixed bug #64264 (SPLFixedArray toArray problem). (Laruence)
|
||||
. Fixed bug #64228 (RecursiveDirectoryIterator always assumes SKIP_DOTS).
|
||||
(patch by kriss@krizalys.com, Laruence)
|
||||
. Fixed bug #64106 (Segfault on SplFixedArray[][x] = y when extended).
|
||||
. Fixed bug #64106 (Segfault on SplFixedArray[][x] = y when extended).
|
||||
(Nikita Popov)
|
||||
. Fixed bug #52861 (unset fails with ArrayObject and deep arrays).
|
||||
(Mike Willbanks)
|
||||
|
@ -43,7 +43,7 @@ See also https://wiki.php.net/rfc/zpp_improv#expose_zend_parse_arg_as_zend_parse
|
||||
Type specifiers
|
||||
---------------
|
||||
The following list shows the type specifier, its meaning and the parameter
|
||||
types that need to be passed by address. All passed paramaters are set
|
||||
types that need to be passed by address. All passed parameters are set
|
||||
if the PHP parameter is non optional and untouched if optional and the
|
||||
parameter is not present. The only exception is O where the zend_class_entry*
|
||||
has to be provided on input and is used to verify the PHP parameter is an
|
||||
|
@ -1,6 +1,6 @@
|
||||
[IMPORTANT NOTICE]
|
||||
------------------
|
||||
Failed tests usualy indicate a problem with your local system setup
|
||||
Failed tests usually indicate a problem with your local system setup
|
||||
and not within PHP itself (at least for official PHP release versions).
|
||||
You may decide to automaticaly submit a test summary to our QA workflow
|
||||
at the end of a test run.
|
||||
|
@ -58,6 +58,10 @@ PHP 5.5 UPGRADE NOTES
|
||||
|
||||
- Support for changing the process's title in CLI/CLI-Server SAPIs. (Keyur)
|
||||
(https://wiki.php.net/rfc/cli_process_title)
|
||||
- Support for systemd in php-fpm:
|
||||
Add --with-fpm-systemd option to report health to systemd, and
|
||||
systemd_interval option to configure this. The service can now use
|
||||
Type=notify in the systemd unit file. (Remi)
|
||||
|
||||
========================================
|
||||
3. Deprecated Functionality
|
||||
|
@ -435,7 +435,7 @@ Changes in the Zend Engine 2.0
|
||||
that of other object-oriented languages, such as Java: When the
|
||||
last reference to an object is destroyed the object's
|
||||
destructor, which is a class method name __destruct() that
|
||||
recieves no parameters, is called before the object is freed
|
||||
receives no parameters, is called before the object is freed
|
||||
from memory.
|
||||
|
||||
Example:
|
||||
|
@ -357,7 +357,7 @@ var_dump($global_var);
|
||||
test_unset3();
|
||||
var_dump($global_var);
|
||||
|
||||
//Note: No error conditions relating to passing arugments can be tested
|
||||
//Note: No error conditions relating to passing arguments can be tested
|
||||
// because these are not functions but statements, it will result in syntax error.
|
||||
?>
|
||||
===DONE===
|
||||
|
@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Bug #32428 (The @ warning error supression operator is broken)
|
||||
Bug #32428 (The @ warning error suppression operator is broken)
|
||||
--FILE--
|
||||
<?php
|
||||
$data = @$not_exists;
|
||||
|
11
Zend/tests/bug64660.phpt
Normal file
11
Zend/tests/bug64660.phpt
Normal file
File diff suppressed because one or more lines are too long
48
Zend/tests/bug64720.phpt
Normal file
48
Zend/tests/bug64720.phpt
Normal file
@ -0,0 +1,48 @@
|
||||
--TEST--
|
||||
Bug #64720 (SegFault on zend_deactivate)
|
||||
--FILE--
|
||||
<?php
|
||||
class Stat {
|
||||
private static $requests;
|
||||
public static function getInstance() {
|
||||
if (!isset(self::$requests[1])) {
|
||||
self::$requests[1] = new self();
|
||||
}
|
||||
return self::$requests[1];
|
||||
}
|
||||
|
||||
public function __destruct() {
|
||||
unset(self::$requests[1]);
|
||||
}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
public function __construct() {
|
||||
Stat::getInstance();
|
||||
}
|
||||
}
|
||||
|
||||
class Error {
|
||||
private $trace;
|
||||
public function __construct() {
|
||||
$this->trace = debug_backtrace(1);
|
||||
}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
public function __destruct() {
|
||||
Stat::getInstance();
|
||||
new Error();
|
||||
}
|
||||
|
||||
public function test() {
|
||||
new Error();
|
||||
}
|
||||
}
|
||||
|
||||
$foo = new Foo();
|
||||
$bar = new Bar();
|
||||
$bar->test();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Access to undeclared static property: Stat::$requests in %sbug64720.php on line 12
|
22
Zend/tests/bug64821.1.phpt
Normal file
22
Zend/tests/bug64821.1.phpt
Normal file
@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
Bug #64821 Custom Exceptions crash when internal properties overridden (variation 1)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class a extends exception {
|
||||
public function __construct() {
|
||||
$this->message = NULL;
|
||||
$this->string = NULL;
|
||||
$this->code = array();
|
||||
$this->line = "hello";
|
||||
}
|
||||
}
|
||||
|
||||
throw new a;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'a' in %s:0
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
19
Zend/tests/bug64821.2.phpt
Normal file
19
Zend/tests/bug64821.2.phpt
Normal file
@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #64821 Custom Exceptions crash when internal properties overridden (variation 2)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class a extends exception {
|
||||
public function __construct() {
|
||||
$this->line = array();
|
||||
}
|
||||
}
|
||||
|
||||
throw new a;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'a' in %s:0
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
20
Zend/tests/bug64821.3.phpt
Normal file
20
Zend/tests/bug64821.3.phpt
Normal file
@ -0,0 +1,20 @@
|
||||
--TEST--
|
||||
Bug #64821 Custom Exceptions crash when internal properties overridden (variation 3)
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class a extends exception {
|
||||
public function __construct() {
|
||||
$this->line = array();
|
||||
$this->file = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
throw new a;
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'a' in :0
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in Unknown on line %d
|
40
Zend/tests/bug64960.phpt
Normal file
40
Zend/tests/bug64960.phpt
Normal file
@ -0,0 +1,40 @@
|
||||
--TEST--
|
||||
Bug #64960 (Segfault in gc_zval_possible_root)
|
||||
--FILE--
|
||||
<?php
|
||||
// this makes ob_end_clean raise an error
|
||||
ob_end_flush();
|
||||
|
||||
class ExceptionHandler {
|
||||
public function __invoke (Exception $e)
|
||||
{
|
||||
// this triggers the custom error handler
|
||||
ob_end_clean();
|
||||
}
|
||||
}
|
||||
|
||||
// this must be a class, closure does not trigger segfault
|
||||
set_exception_handler(new ExceptionHandler());
|
||||
|
||||
// exception must be throwed from error handler.
|
||||
set_error_handler(function()
|
||||
{
|
||||
$e = new Exception;
|
||||
$e->_trace = debug_backtrace();
|
||||
|
||||
throw $e;
|
||||
});
|
||||
|
||||
// trigger error handler
|
||||
$a['waa'];
|
||||
?>
|
||||
--EXPECTF--
|
||||
Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in %sbug64960.php on line 3
|
||||
|
||||
Fatal error: Uncaught exception 'Exception' in %sbug64960.php:19
|
||||
Stack trace:
|
||||
#0 [internal function]: {closure}(8, 'ob_end_clean():...', '%s', 9, Array)
|
||||
#1 %sbug64960.php(9): ob_end_clean()
|
||||
#2 [internal function]: ExceptionHandler->__invoke(Object(Exception))
|
||||
#3 {main}
|
||||
thrown in %sbug64960.php on line 19
|
30
Zend/tests/bug64966.phpt
Normal file
30
Zend/tests/bug64966.phpt
Normal file
@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Bug #64966 (segfault in zend_do_fcall_common_helper_SPEC)
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
set_error_handler(function($error) { throw new Exception(); }, E_RECOVERABLE_ERROR);
|
||||
|
||||
function test($func) {
|
||||
$a = $func("");
|
||||
return true;
|
||||
}
|
||||
class A {
|
||||
public function b() {
|
||||
test("strlen");
|
||||
test("iterator_apply");
|
||||
}
|
||||
}
|
||||
|
||||
$a = new A();
|
||||
$a->b();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'Exception' in %sbug64966.php:3
|
||||
Stack trace:
|
||||
#0 [internal function]: {closure}(4096, 'Argument 1 pass...', '%s', 6, Array)
|
||||
#1 %sbug64966.php(6): iterator_apply('')
|
||||
#2 %sbug64966.php(12): test('iterator_apply')
|
||||
#3 %sbug64966.php(17): A->b()
|
||||
#4 {main}
|
||||
thrown in %sbug64966.php on line 3
|
30
Zend/tests/bug64988.phpt
Normal file
30
Zend/tests/bug64988.phpt
Normal file
@ -0,0 +1,30 @@
|
||||
--TEST--
|
||||
Bug #64988 (Class loading order affects E_STRICT warning)
|
||||
--FILE--
|
||||
<?php
|
||||
abstract class Base1 {
|
||||
public function insert(array $data){
|
||||
return array_reverse($data);
|
||||
}
|
||||
}
|
||||
|
||||
class Noisy1 extends Base1 {
|
||||
public function insert(array $data, $option1 = Null) {
|
||||
if (!empty($option1)) {
|
||||
$data['option1'] = $option1;
|
||||
}
|
||||
return parent::insert($data);
|
||||
}
|
||||
}
|
||||
class Smooth1 extends Noisy1 {
|
||||
public function insert(array $data) {
|
||||
return parent::insert($data, count($data));
|
||||
}
|
||||
}
|
||||
|
||||
$o = new Smooth1();
|
||||
echo "okey";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of Smooth1::insert() should be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 20
|
||||
okey
|
@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
GC 007: Unreferensed array cycle
|
||||
GC 007: Unreferenced array cycle
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
|
@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
GC 008: Unreferensed object cycle
|
||||
GC 008: Unreferenced object cycle
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
|
@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
GC 009: Unreferensed array-object cycle
|
||||
GC 009: Unreferenced array-object cycle
|
||||
--INI--
|
||||
zend.enable_gc=1
|
||||
--FILE--
|
||||
|
@ -9,13 +9,13 @@ function recv() {
|
||||
}
|
||||
}
|
||||
|
||||
$reciever = recv();
|
||||
var_dump($reciever->current());
|
||||
$reciever->send(1);
|
||||
var_dump($reciever->current());
|
||||
$reciever->send(2);
|
||||
var_dump($reciever->current());
|
||||
$reciever->send(3);
|
||||
$receiver = recv();
|
||||
var_dump($receiver->current());
|
||||
$receiver->send(1);
|
||||
var_dump($receiver->current());
|
||||
$receiver->send(2);
|
||||
var_dump($receiver->current());
|
||||
$receiver->send(3);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
|
@ -1172,7 +1172,7 @@ ZEND_API void object_properties_init(zend_object *object, zend_class_entry *clas
|
||||
|
||||
/* This function requires 'properties' to contain all props declared in the
|
||||
* class and all props being public. If only a subset is given or the class
|
||||
* has protected members then you need to merge the properties seperately by
|
||||
* has protected members then you need to merge the properties separately by
|
||||
* calling zend_merge_properties(). */
|
||||
ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type, HashTable *properties ZEND_FILE_LINE_DC TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ typedef struct _zend_fcall_info_cache {
|
||||
#define ZEND_NS_RAW_FENTRY(ns, zend_name, name, arg_info, flags) ZEND_RAW_FENTRY(ZEND_NS_NAME(ns, zend_name), name, arg_info, flags)
|
||||
#define ZEND_NS_RAW_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_RAW_FENTRY(ns, #zend_name, name, arg_info, 0)
|
||||
|
||||
#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_FENTRY(ns, #zend_name, name, arg_info, 0)
|
||||
#define ZEND_NS_NAMED_FE(ns, zend_name, name, arg_info) ZEND_NS_FENTRY(ns, zend_name, name, arg_info, 0)
|
||||
#define ZEND_NS_FE(ns, name, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, 0)
|
||||
#define ZEND_NS_DEP_FE(ns, name, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(name), arg_info, ZEND_ACC_DEPRECATED)
|
||||
#define ZEND_NS_FALIAS(ns, name, alias, arg_info) ZEND_NS_FENTRY(ns, name, ZEND_FN(alias), arg_info, 0)
|
||||
@ -465,7 +465,7 @@ ZEND_API extern const zend_fcall_info_cache empty_fcall_info_cache;
|
||||
*/
|
||||
ZEND_API int zend_fcall_info_init(zval *callable, uint check_flags, zend_fcall_info *fci, zend_fcall_info_cache *fcc, char **callable_name, char **error TSRMLS_DC);
|
||||
|
||||
/** Clear argumens connected with zend_fcall_info *fci
|
||||
/** Clear arguments connected with zend_fcall_info *fci
|
||||
* If free_mem is not zero then the params array gets free'd as well
|
||||
*/
|
||||
ZEND_API void zend_fcall_info_args_clear(zend_fcall_info *fci, int free_mem);
|
||||
@ -503,7 +503,7 @@ ZEND_API int zend_fcall_info_argv(zend_fcall_info *fci TSRMLS_DC, int argc, va_l
|
||||
ZEND_API int zend_fcall_info_argn(zend_fcall_info *fci TSRMLS_DC, int argc, ...);
|
||||
|
||||
/** Call a function using information created by zend_fcall_info_init()/args().
|
||||
* If args is given then those replace the arguement info in fci is temporarily.
|
||||
* If args is given then those replace the argument info in fci is temporarily.
|
||||
*/
|
||||
ZEND_API int zend_fcall_info_call(zend_fcall_info *fci, zend_fcall_info_cache *fcc, zval **retval, zval *args TSRMLS_DC);
|
||||
|
||||
|
@ -288,7 +288,7 @@ ZEND_API zend_bool zend_is_compiling(TSRMLS_D) /* {{{ */
|
||||
|
||||
static zend_uint get_temporary_variable(zend_op_array *op_array) /* {{{ */
|
||||
{
|
||||
return (zend_uint)EX_TMP_VAR_NUM(0, (op_array->T)++);
|
||||
return (zend_uint)(zend_uintptr_t)EX_TMP_VAR_NUM(0, (op_array->T)++);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@ -3464,11 +3464,11 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
|
||||
|
||||
if (child->common.prototype && (child->common.prototype->common.fn_flags & ZEND_ACC_ABSTRACT)) {
|
||||
if (!zend_do_perform_implementation_check(child, child->common.prototype TSRMLS_CC)) {
|
||||
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype? child->common.prototype : parent TSRMLS_CC));
|
||||
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, zend_get_function_declaration(child->common.prototype TSRMLS_CC));
|
||||
}
|
||||
} else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
|
||||
if (!zend_do_perform_implementation_check(child, parent TSRMLS_CC)) {
|
||||
char *method_prototype = zend_get_function_declaration(child->common.prototype? child->common.prototype : parent TSRMLS_CC);
|
||||
char *method_prototype = zend_get_function_declaration(parent TSRMLS_CC);
|
||||
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name, method_prototype);
|
||||
efree(method_prototype);
|
||||
}
|
||||
@ -3941,7 +3941,7 @@ static void zend_add_trait_method(zend_class_entry *ce, const char *name, const
|
||||
#endif
|
||||
} else {
|
||||
/* inherited members are overridden by members inserted by traits */
|
||||
/* check whether the trait method fullfills the inheritance requirements */
|
||||
/* check whether the trait method fulfills the inheritance requirements */
|
||||
do_inheritance_check_on_method(fn, existing_fn TSRMLS_CC);
|
||||
}
|
||||
}
|
||||
@ -5687,7 +5687,7 @@ void zend_do_shell_exec(znode *result, const znode *cmd TSRMLS_DC) /* {{{ */
|
||||
break;
|
||||
}
|
||||
SET_NODE(opline->op1, cmd);
|
||||
opline->op2.opline_num = 0;
|
||||
opline->op2.opline_num = 1;
|
||||
opline->extended_value = ZEND_DO_FCALL;
|
||||
SET_UNUSED(opline->op2);
|
||||
|
||||
@ -7176,7 +7176,7 @@ ZEND_API size_t zend_dirname(char *path, size_t len)
|
||||
}
|
||||
#elif defined(NETWARE)
|
||||
/*
|
||||
* Find the first occurence of : from the left
|
||||
* Find the first occurrence of : from the left
|
||||
* move the path pointer to the position just after :
|
||||
* increment the len_adjust to the length of path till colon character(inclusive)
|
||||
* If there is no character beyond : simple return len
|
||||
|
@ -817,6 +817,10 @@ ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {
|
||||
if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) {
|
||||
file = zend_read_property(default_exception_ce, EG(exception), "file", sizeof("file")-1, 1 TSRMLS_CC);
|
||||
line = zend_read_property(default_exception_ce, EG(exception), "line", sizeof("line")-1, 1 TSRMLS_CC);
|
||||
|
||||
convert_to_string(file);
|
||||
file = (Z_STRLEN_P(file) > 0) ? file : NULL;
|
||||
line = (Z_TYPE_P(line) == IS_LONG) ? line : NULL;
|
||||
} else {
|
||||
file = NULL;
|
||||
line = NULL;
|
||||
@ -828,7 +832,11 @@ ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {
|
||||
file = zend_read_property(default_exception_ce, exception, "file", sizeof("file")-1, 1 TSRMLS_CC);
|
||||
line = zend_read_property(default_exception_ce, exception, "line", sizeof("line")-1, 1 TSRMLS_CC);
|
||||
|
||||
zend_error_va(severity, Z_STRVAL_P(file), Z_LVAL_P(line), "Uncaught %s\n thrown", Z_STRVAL_P(str));
|
||||
convert_to_string(str);
|
||||
convert_to_string(file);
|
||||
convert_to_long(line);
|
||||
|
||||
zend_error_va(severity, (Z_STRLEN_P(file) > 0) ? Z_STRVAL_P(file) : NULL, Z_LVAL_P(line), "Uncaught %s\n thrown", Z_STRVAL_P(str));
|
||||
} else {
|
||||
zend_error(severity, "Uncaught exception '%s'", ce_exception->name);
|
||||
}
|
||||
|
@ -254,15 +254,13 @@ void shutdown_executor(TSRMLS_D) /* {{{ */
|
||||
if (EG(user_error_handler)) {
|
||||
zeh = EG(user_error_handler);
|
||||
EG(user_error_handler) = NULL;
|
||||
zval_dtor(zeh);
|
||||
FREE_ZVAL(zeh);
|
||||
zval_ptr_dtor(&zeh);
|
||||
}
|
||||
|
||||
if (EG(user_exception_handler)) {
|
||||
zeh = EG(user_exception_handler);
|
||||
EG(user_exception_handler) = NULL;
|
||||
zval_dtor(zeh);
|
||||
FREE_ZVAL(zeh);
|
||||
zval_ptr_dtor(&zeh);
|
||||
}
|
||||
|
||||
zend_stack_destroy(&EG(user_error_handlers_error_reporting));
|
||||
|
@ -106,7 +106,7 @@ typedef struct _zend_gc_globals {
|
||||
gc_root_buffer *first_unused; /* pointer to first unused buffer */
|
||||
gc_root_buffer *last_unused; /* pointer to last unused buffer */
|
||||
|
||||
zval_gc_info *zval_to_free; /* temporaryt list of zvals to free */
|
||||
zval_gc_info *zval_to_free; /* temporary list of zvals to free */
|
||||
zval_gc_info *free_list;
|
||||
zval_gc_info *next_to_free;
|
||||
|
||||
@ -199,7 +199,7 @@ static zend_always_inline void gc_remove_from_buffer(gc_root_buffer *root TSRMLS
|
||||
GC_ZVAL_INIT(z); \
|
||||
} while (0)
|
||||
|
||||
/* The following macroses override macroses from zend_alloc.h */
|
||||
/* The following macros override macros from zend_alloc.h */
|
||||
#undef ALLOC_ZVAL
|
||||
#define ALLOC_ZVAL(z) \
|
||||
do { \
|
||||
|
@ -587,7 +587,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
|
||||
compiler_result = zendparse(TSRMLS_C);
|
||||
zend_do_return(&retval_znode, 0 TSRMLS_CC);
|
||||
CG(in_compilation) = original_in_compilation;
|
||||
if (compiler_result==1) { /* parser error */
|
||||
if (compiler_result != 0) { /* parser error */
|
||||
zend_bailout();
|
||||
}
|
||||
compilation_successful=1;
|
||||
@ -762,7 +762,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
|
||||
SCNG(script_filtered) = NULL;
|
||||
}
|
||||
|
||||
if (compiler_result==1) {
|
||||
if (compiler_result != 0) {
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
CG(unclean_shutdown)=1;
|
||||
destroy_op_array(op_array TSRMLS_CC);
|
||||
|
@ -585,7 +585,7 @@ ZEND_API zend_op_array *compile_file(zend_file_handle *file_handle, int type TSR
|
||||
compiler_result = zendparse(TSRMLS_C);
|
||||
zend_do_return(&retval_znode, 0 TSRMLS_CC);
|
||||
CG(in_compilation) = original_in_compilation;
|
||||
if (compiler_result==1) { /* parser error */
|
||||
if (compiler_result != 0) { /* parser error */
|
||||
zend_bailout();
|
||||
}
|
||||
compilation_successful=1;
|
||||
@ -760,7 +760,7 @@ zend_op_array *compile_string(zval *source_string, char *filename TSRMLS_DC)
|
||||
SCNG(script_filtered) = NULL;
|
||||
}
|
||||
|
||||
if (compiler_result==1) {
|
||||
if (compiler_result != 0) {
|
||||
CG(active_op_array) = original_active_op_array;
|
||||
CG(unclean_shutdown)=1;
|
||||
destroy_op_array(op_array TSRMLS_CC);
|
||||
|
@ -1281,6 +1281,14 @@ ZEND_API zval **zend_std_get_static_property(zend_class_entry *ce, const char *p
|
||||
}
|
||||
}
|
||||
|
||||
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL) ||
|
||||
UNEXPECTED(CE_STATIC_MEMBERS(ce)[property_info->offset] == NULL)) {
|
||||
if (!silent) {
|
||||
zend_error_noreturn(E_ERROR, "Access to undeclared static property: %s::$%s", ce->name, property_name);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return &CE_STATIC_MEMBERS(ce)[property_info->offset];
|
||||
}
|
||||
/* }}} */
|
||||
|
@ -166,8 +166,9 @@ static inline void cleanup_user_class_data(zend_class_entry *ce TSRMLS_DC)
|
||||
|
||||
for (i = 0; i < ce->default_static_members_count; i++) {
|
||||
if (ce->static_members_table[i]) {
|
||||
zval_ptr_dtor(&ce->static_members_table[i]);
|
||||
zval *p = ce->static_members_table[i];
|
||||
ce->static_members_table[i] = NULL;
|
||||
zval_ptr_dtor(&p);
|
||||
}
|
||||
}
|
||||
ce->static_members_table = NULL;
|
||||
|
@ -1530,7 +1530,7 @@ ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {
|
||||
/* If both are objects sharing the same comparision handler then use is */
|
||||
if (Z_OBJ_HANDLER_P(op1,compare_objects) == Z_OBJ_HANDLER_P(op2,compare_objects)) {
|
||||
if (Z_OBJ_HANDLE_P(op1) == Z_OBJ_HANDLE_P(op2)) {
|
||||
/* object handles are identical, apprently this is the same object */
|
||||
/* object handles are identical, apparently this is the same object */
|
||||
ZVAL_LONG(result, 0);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
@ -26,6 +26,10 @@
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IEEEFP_H
|
||||
#include <ieeefp.h>
|
||||
#endif
|
||||
@ -497,7 +501,7 @@ ZEND_API void zend_update_current_locale(void);
|
||||
|
||||
/* The offset in bytes between the value and type fields of a zval */
|
||||
#define ZVAL_OFFSETOF_TYPE \
|
||||
(__builtin_offsetof(zval,type) - __builtin_offsetof(zval,value))
|
||||
(offsetof(zval,type) - offsetof(zval,value))
|
||||
|
||||
static zend_always_inline int fast_increment_function(zval *op1)
|
||||
{
|
||||
|
@ -1996,6 +1996,8 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
|
||||
if (!RETURN_VALUE_USED(opline)) {
|
||||
zval_ptr_dtor(&ret->var.ptr);
|
||||
}
|
||||
} else if (RETURN_VALUE_USED(opline)) {
|
||||
EX_T(opline->result.var).var.ptr = NULL;
|
||||
}
|
||||
} else if (fbc->type == ZEND_USER_FUNCTION) {
|
||||
EX(original_return_value) = EG(return_value_ptr_ptr);
|
||||
|
@ -548,6 +548,8 @@ static int ZEND_FASTCALL zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_AR
|
||||
if (!RETURN_VALUE_USED(opline)) {
|
||||
zval_ptr_dtor(&ret->var.ptr);
|
||||
}
|
||||
} else if (RETURN_VALUE_USED(opline)) {
|
||||
EX_T(opline->result.var).var.ptr = NULL;
|
||||
}
|
||||
} else if (fbc->type == ZEND_USER_FUNCTION) {
|
||||
EX(original_return_value) = EG(return_value_ptr_ptr);
|
||||
|
@ -1832,7 +1832,7 @@ AC_TRY_COMPILE([
|
||||
])
|
||||
|
||||
dnl -------------------------------------------------------------------------
|
||||
dnl Library/function existance and build sanity checks
|
||||
dnl Library/function existence and build sanity checks
|
||||
dnl -------------------------------------------------------------------------
|
||||
|
||||
dnl
|
||||
|
@ -376,11 +376,11 @@ while [ $# -gt 0 ]; do
|
||||
eval "opt_${opt_OPT}=yes"
|
||||
;;
|
||||
':' )
|
||||
# option with argument (multiple occurances override)
|
||||
# option with argument (multiple occurrences override)
|
||||
eval "opt_${opt_OPT}=\"\$opt_ARG\""
|
||||
;;
|
||||
'+' )
|
||||
# option with argument (multiple occurances append)
|
||||
# option with argument (multiple occurrences append)
|
||||
eval "opt_${opt_OPT}=\"\$opt_${opt_OPT}\${ASC_NL}\$opt_ARG\""
|
||||
;;
|
||||
* )
|
||||
|
@ -518,7 +518,7 @@ static PHP_FUNCTION(bzcompress)
|
||||
efree(dest);
|
||||
RETURN_LONG(error);
|
||||
} else {
|
||||
/* Copy the buffer, we have perhaps allocate alot more than we need,
|
||||
/* Copy the buffer, we have perhaps allocate a lot more than we need,
|
||||
so we erealloc() the buffer to the proper size */
|
||||
dest = erealloc(dest, dest_len + 1);
|
||||
dest[dest_len] = 0;
|
||||
|
@ -272,6 +272,7 @@
|
||||
#define HALAKIM_PER_METONIC_CYCLE (HALAKIM_PER_LUNAR_CYCLE * (12 * 19 + 7))
|
||||
|
||||
#define JEWISH_SDN_OFFSET 347997
|
||||
#define JEWISH_SDN_MAX 324542846L /* 12/13/887605, greater value raises interger overflow */
|
||||
#define NEW_MOON_OF_CREATION 31524
|
||||
|
||||
#define SUNDAY 0
|
||||
@ -559,7 +560,7 @@ void SdnToJewish(
|
||||
int tishri1After;
|
||||
int yearLength;
|
||||
|
||||
if (sdn <= JEWISH_SDN_OFFSET) {
|
||||
if (sdn <= JEWISH_SDN_OFFSET || sdn > JEWISH_SDN_MAX) {
|
||||
*pYear = 0;
|
||||
*pMonth = 0;
|
||||
*pDay = 0;
|
||||
|
19
ext/calendar/tests/jdtojewish64.phpt
Normal file
19
ext/calendar/tests/jdtojewish64.phpt
Normal file
@ -0,0 +1,19 @@
|
||||
--TEST--
|
||||
Bug #64895: Integer overflow in SndToJewish
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include 'skipif.inc';
|
||||
if (PHP_INT_SIZE == 4) {
|
||||
die("skip this test is for 64bit platform only");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$a = array(38245310, 324542846, 324542847, 9223372036854743639);
|
||||
|
||||
foreach ($a as $x) var_dump(jdtojewish($x));
|
||||
--EXPECTF--
|
||||
string(11) "2/22/103759"
|
||||
string(12) "12/13/887605"
|
||||
string(5) "0/0/0"
|
||||
string(5) "0/0/0"
|
@ -429,7 +429,7 @@ PHP_FUNCTION(com_variant_create_instance)
|
||||
/* If already an array and VT_ARRAY is passed then:
|
||||
- if only VT_ARRAY passed then do not perform a conversion
|
||||
- if VT_ARRAY plus other type passed then perform conversion
|
||||
but will probably fail (origional behavior)
|
||||
but will probably fail (original behavior)
|
||||
*/
|
||||
if ((vt & VT_ARRAY) && (V_VT(&obj->v) & VT_ARRAY)) {
|
||||
long orig_vt = vt;
|
||||
|
@ -2384,18 +2384,9 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC)
|
||||
return props;
|
||||
}
|
||||
|
||||
#define PHP_DATE_INTERVAL_ADD_PROPERTY_I64(n, f) \
|
||||
do { \
|
||||
char i64_buf[DATE_I64_BUF_LEN]; \
|
||||
MAKE_STD_ZVAL(zv); \
|
||||
DATE_I64A(intervalobj->diff->f, i64_buf, DATE_I64_BUF_LEN); \
|
||||
ZVAL_STRING(zv, i64_buf, 1); \
|
||||
zend_hash_update(props, n, strlen(n) + 1, &zv, sizeof(zval), NULL); \
|
||||
} while(0);
|
||||
|
||||
#define PHP_DATE_INTERVAL_ADD_PROPERTY(n,f) \
|
||||
MAKE_STD_ZVAL(zv); \
|
||||
ZVAL_LONG(zv, intervalobj->diff->f); \
|
||||
ZVAL_LONG(zv, (long)intervalobj->diff->f); \
|
||||
zend_hash_update(props, n, strlen(n) + 1, &zv, sizeof(zval), NULL);
|
||||
|
||||
PHP_DATE_INTERVAL_ADD_PROPERTY("y", y);
|
||||
@ -2409,14 +2400,14 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC)
|
||||
PHP_DATE_INTERVAL_ADD_PROPERTY("first_last_day_of", first_last_day_of);
|
||||
PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert);
|
||||
if (intervalobj->diff->days != -99999) {
|
||||
PHP_DATE_INTERVAL_ADD_PROPERTY_I64("days", days);
|
||||
PHP_DATE_INTERVAL_ADD_PROPERTY("days", days);
|
||||
} else {
|
||||
MAKE_STD_ZVAL(zv);
|
||||
ZVAL_FALSE(zv);
|
||||
zend_hash_update(props, "days", 5, &zv, sizeof(zval), NULL);
|
||||
}
|
||||
PHP_DATE_INTERVAL_ADD_PROPERTY("special_type", special.type);
|
||||
PHP_DATE_INTERVAL_ADD_PROPERTY_I64("special_amount", special.amount);
|
||||
PHP_DATE_INTERVAL_ADD_PROPERTY("special_amount", special.amount);
|
||||
PHP_DATE_INTERVAL_ADD_PROPERTY("have_weekday_relative", have_weekday_relative);
|
||||
PHP_DATE_INTERVAL_ADD_PROPERTY("have_special_relative", have_special_relative);
|
||||
|
||||
@ -3704,27 +3695,30 @@ static int php_date_timezone_initialize_from_hash(zval **return_value, php_timez
|
||||
zval **z_timezone = NULL;
|
||||
zval **z_timezone_type = NULL;
|
||||
timelib_tzinfo *tzi;
|
||||
char **offset;
|
||||
|
||||
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS) {
|
||||
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS) {
|
||||
convert_to_long(*z_timezone_type);
|
||||
switch (Z_LVAL_PP(z_timezone_type)) {
|
||||
case TIMELIB_ZONETYPE_OFFSET:
|
||||
offset = malloc(sizeof(char) * (Z_STRLEN_PP(z_timezone) + 1));
|
||||
*offset = (Z_STRVAL_PP(z_timezone));
|
||||
if(**offset == '+'){
|
||||
++*offset;
|
||||
(*tzobj)->tzi.utc_offset = -1 * timelib_parse_tz_cor((char **)offset);
|
||||
case TIMELIB_ZONETYPE_OFFSET: {
|
||||
char *offset, *offset_start;
|
||||
|
||||
offset = emalloc(sizeof(char) * (Z_STRLEN_PP(z_timezone) + 1));
|
||||
memmove(offset, Z_STRVAL_PP(z_timezone), Z_STRLEN_PP(z_timezone)+1);
|
||||
offset_start = offset;
|
||||
|
||||
++offset;
|
||||
if(*offset_start == '+'){
|
||||
(*tzobj)->tzi.utc_offset = -1 * timelib_parse_tz_cor(&offset);
|
||||
} else {
|
||||
++*offset;
|
||||
(*tzobj)->tzi.utc_offset = timelib_parse_tz_cor((char **)offset);
|
||||
(*tzobj)->tzi.utc_offset = timelib_parse_tz_cor(&offset);
|
||||
}
|
||||
free(offset);
|
||||
efree(offset_start);
|
||||
(*tzobj)->type = TIMELIB_ZONETYPE_OFFSET;
|
||||
(*tzobj)->initialized = 1;
|
||||
return SUCCESS;
|
||||
break;
|
||||
}
|
||||
case TIMELIB_ZONETYPE_ABBR:
|
||||
case TIMELIB_ZONETYPE_ID:
|
||||
if (SUCCESS == timezone_initialize(&tzi, Z_STRVAL_PP(z_timezone) TSRMLS_CC)) {
|
||||
|
@ -34,11 +34,11 @@ object(DateInterval)#%d (15) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(1) "3"
|
||||
int(3)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
|
@ -34,7 +34,7 @@ object(DateInterval)#1 (15) {
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
|
@ -54,17 +54,17 @@ object(DateInterval)#3 (15) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
int(0)
|
||||
}
|
||||
string(328) "O:12:"DateInterval":15:{s:1:"y";i:0;s:1:"m";i:0;s:1:"d";i:0;s:1:"h";i:4;s:1:"i";i:0;s:1:"s";i:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";s:1:"0";s:12:"special_type";i:0;s:14:"special_amount";s:1:"0";s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;}"
|
||||
string(320) "O:12:"DateInterval":15:{s:1:"y";i:0;s:1:"m";i:0;s:1:"d";i:0;s:1:"h";i:4;s:1:"i";i:0;s:1:"s";i:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";i:0;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;}"
|
||||
DateInterval::__set_state(array(
|
||||
'y' => 0,
|
||||
'm' => 0,
|
||||
@ -76,9 +76,9 @@ DateInterval::__set_state(array(
|
||||
'weekday_behavior' => 0,
|
||||
'first_last_day_of' => 0,
|
||||
'invert' => 0,
|
||||
'days' => '0',
|
||||
'days' => 0,
|
||||
'special_type' => 0,
|
||||
'special_amount' => '0',
|
||||
'special_amount' => 0,
|
||||
'have_weekday_relative' => 0,
|
||||
'have_special_relative' => 0,
|
||||
))object(DateInterval)#5 (15) {
|
||||
@ -103,11 +103,11 @@ DateInterval::__set_state(array(
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
@ -150,11 +150,11 @@ object(DatePeriod)#6 (6) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
@ -187,11 +187,11 @@ object(DateInterval)#8 (15) {
|
||||
["invert"]=>
|
||||
int(1)
|
||||
["days"]=>
|
||||
string(4) "2400"
|
||||
int(2400)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(2) "-1"
|
||||
int(-1)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
@ -234,11 +234,11 @@ object(DatePeriod)#9 (6) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
|
@ -47,11 +47,11 @@ object(DateInterval)#%d (15) {
|
||||
["invert"]=>
|
||||
int(1)
|
||||
["days"]=>
|
||||
string(3) "437"
|
||||
int(437)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
@ -79,11 +79,11 @@ object(DateInterval)#%d (15) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(3) "294"
|
||||
int(294)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
@ -111,11 +111,11 @@ object(DateInterval)#%d (15) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(3) "294"
|
||||
int(294)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
|
@ -77,7 +77,7 @@ object(DatePeriod)#1 (6) {
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
@ -132,11 +132,11 @@ object(DatePeriod)#5 (6) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
|
@ -39,7 +39,7 @@ object(DateInterval)#1 (15) {
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
@ -67,11 +67,11 @@ object(DateInterval)#2 (15) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
|
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
Bug #53437 DateInterval unserialize bad data
|
||||
Bug #53437 DateInterval unserialize bad data, 32 bit
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 4) { die('skip 32 bit only'); } ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$s = 'O:12:"DateInterval":15:{s:1:"y";s:1:"2";s:1:"m";s:1:"0";s:1:"d";s:3:"bla";s:1:"h";s:1:"6";s:1:"i";s:1:"8";s:1:"s";s:1:"0";s:7:"weekday";i:10;s:16:"weekday_behavior";i:10;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";s:4:"aoeu";s:12:"special_type";i:0;s:14:"special_amount";s:21:"234523452345234532455";s:21:"have_weekday_relative";i:21474836489;s:21:"have_special_relative";s:3:"bla";}';
|
||||
@ -9,8 +11,8 @@ var_dump($di);
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECT--
|
||||
object(DateInterval)#1 (15) {
|
||||
--EXPECTF--
|
||||
object(DateInterval)#%d (15) {
|
||||
["y"]=>
|
||||
int(2)
|
||||
["m"]=>
|
||||
@ -32,11 +34,11 @@ object(DateInterval)#1 (15) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(19) "9223372036854775807"
|
||||
int(-1)
|
||||
["have_weekday_relative"]=>
|
||||
int(9)
|
||||
["have_special_relative"]=>
|
||||
|
64
ext/date/tests/bug53437_var4.phpt
Normal file
64
ext/date/tests/bug53437_var4.phpt
Normal file
@ -0,0 +1,64 @@
|
||||
--TEST--
|
||||
Bug #53437 (Check that var_dump out is the same using the whole object or it's single properties), variation 4
|
||||
--INI--
|
||||
date.timezone = Europe/Berlin
|
||||
--FILE--
|
||||
<?php
|
||||
$dt = new DateTime('2009-10-11');
|
||||
|
||||
$df = $dt->diff(new DateTime('2009-10-13'));
|
||||
|
||||
var_dump($df,
|
||||
$df->y,
|
||||
$df->m,
|
||||
$df->d,
|
||||
$df->h,
|
||||
$df->i,
|
||||
$df->s,
|
||||
$df->invert,
|
||||
$df->days);
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
object(DateInterval)#%d (15) {
|
||||
["y"]=>
|
||||
int(0)
|
||||
["m"]=>
|
||||
int(0)
|
||||
["d"]=>
|
||||
int(2)
|
||||
["h"]=>
|
||||
int(0)
|
||||
["i"]=>
|
||||
int(0)
|
||||
["s"]=>
|
||||
int(0)
|
||||
["weekday"]=>
|
||||
int(0)
|
||||
["weekday_behavior"]=>
|
||||
int(0)
|
||||
["first_last_day_of"]=>
|
||||
int(0)
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
int(2)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
int(0)
|
||||
}
|
||||
int(0)
|
||||
int(0)
|
||||
int(2)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
int(2)
|
||||
==DONE==
|
47
ext/date/tests/bug53437_var5.phpt
Normal file
47
ext/date/tests/bug53437_var5.phpt
Normal file
@ -0,0 +1,47 @@
|
||||
--TEST--
|
||||
Bug #53437 DateInterval unserialize bad data, 64 bit
|
||||
--SKIPIF--
|
||||
<?php if (PHP_INT_SIZE != 8) { die('skip true 64 bit only'); } ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$s = 'O:12:"DateInterval":15:{s:1:"y";s:1:"2";s:1:"m";s:1:"0";s:1:"d";s:3:"bla";s:1:"h";s:1:"6";s:1:"i";s:1:"8";s:1:"s";s:1:"0";s:7:"weekday";i:10;s:16:"weekday_behavior";i:10;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";s:4:"aoeu";s:12:"special_type";i:0;s:14:"special_amount";s:21:"234523452345234532455";s:21:"have_weekday_relative";i:21474836489;s:21:"have_special_relative";s:3:"bla";}';
|
||||
|
||||
$di = unserialize($s);
|
||||
var_dump($di);
|
||||
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
object(DateInterval)#%d (15) {
|
||||
["y"]=>
|
||||
int(2)
|
||||
["m"]=>
|
||||
int(0)
|
||||
["d"]=>
|
||||
int(0)
|
||||
["h"]=>
|
||||
int(6)
|
||||
["i"]=>
|
||||
int(8)
|
||||
["s"]=>
|
||||
int(0)
|
||||
["weekday"]=>
|
||||
int(10)
|
||||
["weekday_behavior"]=>
|
||||
int(10)
|
||||
["first_last_day_of"]=>
|
||||
int(0)
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
int(0)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
int(9223372036854775807)
|
||||
["have_weekday_relative"]=>
|
||||
int(9)
|
||||
["have_special_relative"]=>
|
||||
int(0)
|
||||
}
|
||||
==DONE==
|
@ -34,7 +34,7 @@ object(DateInterval)#1 (%d) {
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
|
@ -50,11 +50,11 @@ object(DateInterval)#3 (15) {
|
||||
["invert"]=>
|
||||
int(0)
|
||||
["days"]=>
|
||||
string(2) "33"
|
||||
int(33)
|
||||
["special_type"]=>
|
||||
int(0)
|
||||
["special_amount"]=>
|
||||
string(1) "0"
|
||||
int(0)
|
||||
["have_weekday_relative"]=>
|
||||
int(0)
|
||||
["have_special_relative"]=>
|
||||
|
@ -14,7 +14,7 @@ offset: +1 GMT
|
||||
|
||||
echo "Basic test for date_sunrise() and date_sunset()\n";
|
||||
|
||||
// supress date() function strict msgs
|
||||
// suppress date() function strict msgs
|
||||
error_reporting(E_ALL & ~E_STRICT);
|
||||
|
||||
echo date("D M d Y") . ', sunrise time : ' . date_sunrise(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1) . "\n";
|
||||
|
@ -20,7 +20,7 @@ DBA CDB handler test (read only)
|
||||
$keys .= $a;
|
||||
$count++;
|
||||
}
|
||||
// display number of entries and key existance
|
||||
// display number of entries and key existence
|
||||
echo $count;
|
||||
for ($i=1; $i<8; $i++) {
|
||||
echo dba_exists($i, $db_file) ? "Y" : "N";
|
||||
|
@ -177,7 +177,7 @@ PHP_METHOD(domelement, __construct)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
/* Namespace logic is seperate and only when uri passed in to insure no BC breakage */
|
||||
/* Namespace logic is separate and only when uri passed in to insure no BC breakage */
|
||||
if (uri_len > 0) {
|
||||
errorcode = dom_check_qname(name, &localname, &prefix, uri_len, name_len);
|
||||
if (errorcode == 0) {
|
||||
|
17
ext/dom/tests/DOMDocument_loadHTMLfile.phpt
Normal file
17
ext/dom/tests/DOMDocument_loadHTMLfile.phpt
Normal file
@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Test DOMDocument::loadHTMLFile
|
||||
--DESCRIPTION--
|
||||
Verifies the basic behaviour of the method
|
||||
--CREDITS--
|
||||
Antonio Diaz Ruiz <dejalatele@gmail.com>
|
||||
--INI--
|
||||
assert.bail=true
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$doc = new DOMDocument();
|
||||
$result = $doc->loadHTMLFile(dirname(__FILE__) . "/test.html");
|
||||
assert('$result === true');
|
||||
?>
|
||||
--EXPECT--
|
18
ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt
Normal file
18
ext/dom/tests/DOMDocument_loadHTMLfile_error1.phpt
Normal file
@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Test DOMDocument::loadHTMLFile when the file doesn't exist
|
||||
--DESCRIPTION--
|
||||
Verifies that an error message is showed if the file doesn't exist
|
||||
--CREDITS--
|
||||
Antonio Diaz Ruiz <dejalatele@gmail.com>
|
||||
--INI--
|
||||
assert.bail=true
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$doc = new DOMDocument();
|
||||
$result = $doc->loadHTMLFile(dirname(__FILE__) . "/ffff/test.html");
|
||||
assert('$result === false');
|
||||
?>
|
||||
--EXPECTF--
|
||||
%r(PHP ){0,1}%rWarning: DOMDocument::loadHTMLFile(): I/O warning : failed to load external entity %s
|
18
ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt
Normal file
18
ext/dom/tests/DOMDocument_loadHTMLfile_error2.phpt
Normal file
@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Test DOMDocument::loadHTMLFile when an empty string is passed
|
||||
--DESCRIPTION--
|
||||
Verifies that an error message is showed if an empty string is passed as argument
|
||||
--CREDITS--
|
||||
Antonio Diaz Ruiz <dejalatele@gmail.com>
|
||||
--INI--
|
||||
assert.bail=true
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$doc = new DOMDocument();
|
||||
$result = $doc->loadHTMLFile("");
|
||||
assert('$result === false');
|
||||
?>
|
||||
--EXPECTF--
|
||||
%r(PHP ){0,1}%rWarning: DOMDocument::loadHTMLFile(): Empty string supplied as input %s
|
18
ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt
Normal file
18
ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt
Normal file
@ -0,0 +1,18 @@
|
||||
--TEST--
|
||||
Test DOMDocument::loadHTMLFile when an empty document is loaded
|
||||
--DESCRIPTION--
|
||||
Verifies that an warning message is showed if an empty document is loaded
|
||||
--CREDITS--
|
||||
Antonio Diaz Ruiz <dejalatele@gmail.com>
|
||||
--INI--
|
||||
assert.bail=true
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$doc = new DOMDocument();
|
||||
$result = $doc->loadHTMLFile(dirname(__FILE__) . "/empty.html");
|
||||
assert('$result === true');
|
||||
?>
|
||||
--EXPECTF--
|
||||
%r(PHP ){0,1}%rWarning: DOMDocument::loadHTMLFile(): Document is empty %s
|
17
ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt
Normal file
17
ext/dom/tests/DOMDocument_loadHTMLfile_variation2.phpt
Normal file
@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Test DOMDocument::loadHTMLFile when a not-well formed document is loaded
|
||||
--DESCRIPTION--
|
||||
Verifies the behavior if a not-well formed document is loaded
|
||||
--CREDITS--
|
||||
Antonio Diaz Ruiz <dejalatele@gmail.com>
|
||||
--INI--
|
||||
assert.bail=true
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$doc = new DOMDocument();
|
||||
$result = $doc->loadHTMLFile(dirname(__FILE__) . "/not_well.html");
|
||||
assert('$result === true');
|
||||
?>
|
||||
--EXPECT--
|
@ -39,7 +39,7 @@ $root = $dom->documentElement;
|
||||
|
||||
$children = $root->childNodes;
|
||||
$len = $children->length;
|
||||
echo "orignal has $len nodes\n";
|
||||
echo "original has $len nodes\n";
|
||||
for ($index = $children->length - 1; $index >=0; $index--) {
|
||||
echo "node $index\n";
|
||||
$current = $children->item($index);
|
||||
@ -58,7 +58,7 @@ for ($index = 0; $index < $children->length; $index++) {
|
||||
}
|
||||
|
||||
--EXPECTF--
|
||||
orignal has 5 nodes
|
||||
original has 5 nodes
|
||||
node 4
|
||||
Course: no title:DOMText
|
||||
~string(1) "
|
||||
|
0
ext/dom/tests/empty.html
Normal file
0
ext/dom/tests/empty.html
Normal file
8
ext/dom/tests/not_well.html
Normal file
8
ext/dom/tests/not_well.html
Normal file
@ -0,0 +1,8 @@
|
||||
<head>
|
||||
<title>Hello world</title>
|
||||
</head>
|
||||
<body>
|
||||
This is a not well-formed<br>
|
||||
html files with undeclared entities
|
||||
</body>
|
||||
</html>
|
@ -651,7 +651,7 @@ PHP_FUNCTION(enchant_broker_free_dict)
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto bool enchant_broker_dict_exists(resource broker, string tag)
|
||||
Wether a dictionary exists or not. Using non-empty tag */
|
||||
Whether a dictionary exists or not. Using non-empty tag */
|
||||
PHP_FUNCTION(enchant_broker_dict_exists)
|
||||
{
|
||||
zval *broker;
|
||||
|
@ -78,7 +78,7 @@ $values = array (
|
||||
|
||||
|
||||
// loop through each element of the array and check the working of exif_tagname()
|
||||
// when $index arugment is supplied with different values
|
||||
// when $index argument is supplied with different values
|
||||
|
||||
echo "\n--- Testing exif_tagname() by supplying different values for 'index' argument ---\n";
|
||||
$counter = 1;
|
||||
|
@ -2978,7 +2978,7 @@ diff -u libmagic.orig/readelf.h libmagic/readelf.h
|
||||
typedef uint8_t Elf64_Char;
|
||||
diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
--- libmagic.orig/softmagic.c 2013-03-21 18:45:14.000000000 +0100
|
||||
+++ libmagic/softmagic.c 2013-04-08 15:42:57.328298809 +0200
|
||||
+++ libmagic/softmagic.c 2013-05-14 11:00:07.044745939 +0200
|
||||
@@ -41,6 +41,11 @@
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
@ -3123,7 +3123,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1717,9 +1694,9 @@
|
||||
@@ -1717,12 +1694,12 @@
|
||||
ms->o.buf = sbuf;
|
||||
ms->offset = soffset;
|
||||
if (rv == 1) {
|
||||
@ -3134,7 +3134,11 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c
|
||||
+ return -1;
|
||||
if (file_printf(ms, "%s", rbuf) == -1)
|
||||
return -1;
|
||||
free(rbuf);
|
||||
- free(rbuf);
|
||||
+ efree(rbuf);
|
||||
}
|
||||
return rv;
|
||||
|
||||
@@ -1837,6 +1814,42 @@
|
||||
return file_strncmp(a, b, len, flags);
|
||||
}
|
||||
|
@ -1699,7 +1699,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
return -1;
|
||||
if (file_printf(ms, "%s", rbuf) == -1)
|
||||
return -1;
|
||||
free(rbuf);
|
||||
efree(rbuf);
|
||||
}
|
||||
return rv;
|
||||
|
||||
|
@ -18,7 +18,7 @@ ksort($results);
|
||||
var_dump($results);
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(7) {
|
||||
array(8) {
|
||||
["%s/resources/dir.zip"]=>
|
||||
string(15) "application/zip"
|
||||
["%s/resources/test.awk"]=>
|
||||
@ -29,6 +29,8 @@ array(7) {
|
||||
string(9) "image/gif"
|
||||
["%s/resources/test.jpg"]=>
|
||||
string(10) "image/jpeg"
|
||||
["%s/resources/test.mp3"]=>
|
||||
string(10) "audio/mpeg"
|
||||
["%s/resources/test.pdf"]=>
|
||||
string(15) "application/pdf"
|
||||
["%s/resources/test.png"]=>
|
||||
|
@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Test finfo extention : loading into phpinfo()
|
||||
Test finfo extension : loading into phpinfo()
|
||||
--SKIPIF--
|
||||
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
|
||||
--FILE--
|
||||
|
@ -4957,7 +4957,7 @@
|
||||
>>>>0 ubelong =0 \b, next free block index %lu
|
||||
>>>>0 ubelong !0 \b, next free block index %lu
|
||||
>>>512 default x dBase IV DBT
|
||||
# DBF file name without extention
|
||||
# DBF file name without extension
|
||||
>>>>8 string >\0 \b of %-.8s.DBF
|
||||
# size of blocks ; not reliable 0x2020204C
|
||||
#>>>>4 ulelong =0 \b, blocks size %lu
|
||||
@ -13205,7 +13205,7 @@
|
||||
# they have their real name at offset 22
|
||||
>>>>>22 string >\0 \b%-.5s
|
||||
>4 uleshort&0x8000 0x0000
|
||||
# 32 bit sector adressing ( > 32 MB) for block devices
|
||||
# 32 bit sector addressing ( > 32 MB) for block devices
|
||||
>>4 uleshort&0x0002 0x0002 \b,32-bit sector-
|
||||
# support by driver functions 13h, 17h, 18h
|
||||
>4 uleshort&0x0040 0x0040 \b,IOCTL-
|
||||
@ -17951,7 +17951,7 @@
|
||||
# 00030 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................
|
||||
# 00040 00 00 00 00 ff ff ff ff ff ff ff ff 02 00 00 00 ................
|
||||
#
|
||||
# GRR this test is still too general as it catches example adressen.dbt
|
||||
# GRR this test is still too general as it catches example addressen.dbt
|
||||
0 belong 0x03000000
|
||||
>8 ubelong 0xec020000 VMS Alpha executable
|
||||
>>75264 string PK\003\004 \b, Info-ZIP SFX archive v5.12 w/decryption
|
||||
|
BIN
ext/fileinfo/tests/resources/test.mp3
Normal file
BIN
ext/fileinfo/tests/resources/test.mp3
Normal file
Binary file not shown.
@ -1,5 +1,7 @@
|
||||
--TEST--
|
||||
#49510 boolean validation fails with FILTER_NULL_ON_FAILURE
|
||||
Bug #49510 boolean validation fails with FILTER_NULL_ON_FAILURE
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("filter")) die("skip"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(filter_var(false, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE));
|
||||
|
161
ext/gd/config.m4
161
ext/gd/config.m4
@ -9,7 +9,6 @@ dnl
|
||||
PHP_ARG_WITH(gd, for GD support,
|
||||
[ --with-gd[=DIR] Include GD support. DIR is the GD library base
|
||||
install directory [BUNDLED]])
|
||||
|
||||
if test -z "$PHP_VPX_DIR"; then
|
||||
PHP_ARG_WITH(vpx-dir, for the location of libvpx,
|
||||
[ --with-vpx-dir[=DIR] GD: Set the path to libvpx install prefix], no, no)
|
||||
@ -159,18 +158,11 @@ AC_DEFUN([PHP_GD_XPM],[
|
||||
if test "$PHP_XPM_DIR" != "no"; then
|
||||
|
||||
for i in $PHP_XPM_DIR /usr/local /usr/X11R6 /usr; do
|
||||
test -f $i/$PHP_LIBDIR/libXpm.$SHLIB_SUFFIX_NAME || test -f $i/$PHP_LIBDIR/libXpm.a && GD_XPM_DIR=$i && break
|
||||
test -f $i/include/xpm.h && GD_XPM_DIR=$i && GD_XPM_INC=$i && break
|
||||
test -f $i/include/X11/xpm.h && GD_XPM_DIR=$i && GD_XPM_INC=$i/X11 && break
|
||||
done
|
||||
|
||||
if test -z "$GD_XPM_DIR"; then
|
||||
AC_MSG_ERROR([libXpm.(a|so) not found.])
|
||||
fi
|
||||
|
||||
for i in include include/X11; do
|
||||
test -f $GD_XPM_DIR/$i/xpm.h && GD_XPM_INC=$GD_XPM_DIR/include
|
||||
done
|
||||
|
||||
if test -z "$GD_XPM_INC"; then
|
||||
AC_MSG_ERROR([xpm.h not found.])
|
||||
fi
|
||||
|
||||
@ -259,41 +251,37 @@ AC_DEFUN([PHP_GD_JISX0208],[
|
||||
])
|
||||
|
||||
AC_DEFUN([PHP_GD_CHECK_VERSION],[
|
||||
PHP_CHECK_LIBRARY(gd, gdImageString16, [AC_DEFINE(HAVE_LIBGD13, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImagePaletteCopy, [AC_DEFINE(HAVE_LIBGD15, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromGif, [AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageGif, [AC_DEFINE(HAVE_GD_GIF_CREATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageWBMP, [AC_DEFINE(HAVE_GD_WBMP, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromWebp, [AC_DEFINE(HAVE_GD_WEBP, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpeg, [AC_DEFINE(HAVE_GD_JPG, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromXpm, [AC_DEFINE(HAVE_GD_XPM, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromGd2, [AC_DEFINE(HAVE_GD_GD2, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateTrueColor, [AC_DEFINE(HAVE_LIBGD20, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageSetTile, [AC_DEFINE(HAVE_GD_IMAGESETTILE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageEllipse, [AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageSetBrush, [AC_DEFINE(HAVE_GD_IMAGESETBRUSH, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageStringTTF, [AC_DEFINE(HAVE_GD_STRINGTTF, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageStringFT, [AC_DEFINE(HAVE_GD_STRINGFT, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageStringFTEx, [AC_DEFINE(HAVE_GD_STRINGFTEX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageColorClosestHWB, [AC_DEFINE(HAVE_COLORCLOSESTHWB, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageColorResolve, [AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageGifCtx, [AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdCacheCreate, [AC_DEFINE(HAVE_GD_CACHE_CREATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdFontCacheShutdown, [AC_DEFINE(HAVE_GD_FONTCACHESHUTDOWN,1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdFreeFontCache, [AC_DEFINE(HAVE_GD_FREEFONTCACHE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdFontCacheMutexSetup, [AC_DEFINE(HAVE_GD_FONTMUTEX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdNewDynamicCtxEx, [AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageConvolution, [AC_DEFINE(HAVE_GD_IMAGE_CONVOLUTION, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImagePixelate, [AC_DEFINE(HAVE_GD_IMAGE_PIXELATE, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageFlipBoth, [AC_DEFINE(HAVE_GD_IMAGE_FLIP, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpegEx,[AC_DEFINE(HAVE_GD_JPGEX, 1, [ ])], [], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromPng, [AC_DEFINE(HAVE_GD_PNG, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromWebp, [AC_DEFINE(HAVE_GD_WEBP, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromJpeg, [AC_DEFINE(HAVE_GD_JPG, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreateFromXpm, [AC_DEFINE(HAVE_GD_XPM, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
|
||||
PHP_CHECK_LIBRARY(gd, gdImageStringFT, [AC_DEFINE(HAVE_GD_FREETYPE, 1, [ ])], [], [ $GD_SHARED_LIBADD ])
|
||||
])
|
||||
|
||||
dnl
|
||||
dnl Main GD configure
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl Common for both builtin and external GD
|
||||
dnl
|
||||
if test "$PHP_GD" != "no"; then
|
||||
|
||||
dnl PNG is required by GD library
|
||||
test "$PHP_PNG_DIR" = "no" && PHP_PNG_DIR=yes
|
||||
|
||||
dnl Various checks for GD features
|
||||
PHP_GD_ZLIB
|
||||
PHP_GD_TTSTR
|
||||
PHP_GD_VPX
|
||||
PHP_GD_JPEG
|
||||
PHP_GD_PNG
|
||||
PHP_GD_XPM
|
||||
PHP_GD_FREETYPE2
|
||||
PHP_GD_T1LIB
|
||||
PHP_GD_JISX0208
|
||||
fi
|
||||
|
||||
if test "$PHP_GD" = "yes"; then
|
||||
GD_MODULE_TYPE=builtin
|
||||
extra_sources="libgd/gd.c libgd/gd_gd.c libgd/gd_gd2.c libgd/gd_io.c libgd/gd_io_dp.c \
|
||||
@ -303,48 +291,15 @@ if test "$PHP_GD" = "yes"; then
|
||||
libgd/gdcache.c libgd/gdkanji.c libgd/wbmp.c libgd/gd_wbmp.c libgd/gdhelpers.c \
|
||||
libgd/gd_topal.c libgd/gd_gif_in.c libgd/xbm.c libgd/gd_gif_out.c libgd/gd_security.c \
|
||||
libgd/gd_filter.c libgd/gd_pixelate.c libgd/gd_arc.c libgd/gd_rotate.c libgd/gd_color.c \
|
||||
libgd/gd_transform.c libgd/gd_crop.c libgd/gd_interpolation.c libgd/gd_matrix.c"
|
||||
libgd/gd_transform.c libgd/gd_crop.c libgd/gd_interpolation.c libgd/gd_matrix.c"
|
||||
|
||||
dnl check for fabsf and floorf which are available since C99
|
||||
AC_CHECK_FUNCS(fabsf floorf)
|
||||
|
||||
dnl PNG is required by GD library
|
||||
test "$PHP_PNG_DIR" = "no" && PHP_PNG_DIR=yes
|
||||
|
||||
dnl Various checks for GD features
|
||||
PHP_GD_ZLIB
|
||||
PHP_GD_TTSTR
|
||||
PHP_GD_JISX0208
|
||||
PHP_GD_JPEG
|
||||
PHP_GD_VPX
|
||||
PHP_GD_PNG
|
||||
PHP_GD_XPM
|
||||
PHP_GD_FREETYPE2
|
||||
PHP_GD_T1LIB
|
||||
|
||||
dnl These are always available with bundled library
|
||||
AC_DEFINE(HAVE_LIBGD, 1, [ ])
|
||||
AC_DEFINE(HAVE_LIBGD13, 1, [ ])
|
||||
AC_DEFINE(HAVE_LIBGD15, 1, [ ])
|
||||
AC_DEFINE(HAVE_LIBGD20, 1, [ ])
|
||||
AC_DEFINE(HAVE_LIBGD204, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_IMAGESETTILE, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_IMAGESETBRUSH, 1, [ ])
|
||||
AC_DEFINE(HAVE_GDIMAGECOLORRESOLVE, 1, [ ])
|
||||
AC_DEFINE(HAVE_COLORCLOSESTHWB, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_WBMP, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_GD2, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_PNG, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_XBM, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_BUNDLED, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_GIF_READ, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_GIF_CREATE, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_IMAGEELLIPSE, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_FONTCACHESHUTDOWN,1, [ ])
|
||||
AC_DEFINE(HAVE_GD_FONTMUTEX, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_DYNAMIC_CTX_EX, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_GIF_CTX, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_IMAGE_FLIP, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_PNG, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_CACHE_CREATE, 1, [ ])
|
||||
|
||||
dnl Make sure the libgd/ is first in the include path
|
||||
GDLIB_CFLAGS="-DHAVE_LIBPNG"
|
||||
@ -359,7 +314,6 @@ dnl enable the support in bundled GD library
|
||||
|
||||
if test -n "$GD_JPEG_DIR"; then
|
||||
AC_DEFINE(HAVE_GD_JPG, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_JPGEX, 1, [ ])
|
||||
GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBJPEG"
|
||||
fi
|
||||
|
||||
@ -369,8 +323,7 @@ dnl enable the support in bundled GD library
|
||||
fi
|
||||
|
||||
if test -n "$FREETYPE2_DIR"; then
|
||||
AC_DEFINE(HAVE_GD_STRINGFT, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_STRINGFTEX, 1, [ ])
|
||||
AC_DEFINE(HAVE_GD_FREETYPE, 1, [ ])
|
||||
AC_DEFINE(ENABLE_GD_TTF, 1, [ ])
|
||||
GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBFREETYPE -DENABLE_GD_TTF"
|
||||
fi
|
||||
@ -384,8 +337,7 @@ else
|
||||
|
||||
if test "$PHP_GD" != "no"; then
|
||||
GD_MODULE_TYPE=external
|
||||
extra_sources="gdcache.c libgd/gd_compat.c libgd/gd_filter.c libgd/gd_pixelate.c libgd/gd_arc.c \
|
||||
libgd/gd_rotate.c libgd/gd_color.c"
|
||||
extra_sources="gd_compat.c"
|
||||
|
||||
dnl Various checks for GD features
|
||||
PHP_GD_ZLIB
|
||||
@ -398,44 +350,28 @@ dnl Various checks for GD features
|
||||
PHP_GD_T1LIB
|
||||
|
||||
dnl Header path
|
||||
for i in include/gd1.3 include/gd include gd1.3 gd ""; do
|
||||
for i in include/gd include gd ""; do
|
||||
test -f "$PHP_GD/$i/gd.h" && GD_INCLUDE="$PHP_GD/$i"
|
||||
done
|
||||
|
||||
dnl Library path
|
||||
for i in $PHP_LIBDIR/gd1.3 $PHP_LIBDIR/gd $PHP_LIBDIR gd1.3 gd ""; do
|
||||
test -f "$PHP_GD/$i/libgd.$SHLIB_SUFFIX_NAME" || test -f "$PHP_GD/$i/libgd.a" && GD_LIB="$PHP_GD/$i"
|
||||
done
|
||||
|
||||
if test -n "$GD_INCLUDE" && test -n "$GD_LIB"; then
|
||||
PHP_ADD_LIBRARY_WITH_PATH(gd, $GD_LIB, GD_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_LIBGD,1,[ ])
|
||||
PHP_GD_CHECK_VERSION
|
||||
elif test -z "$GD_INCLUDE"; then
|
||||
if test -z "$GD_INCLUDE"; then
|
||||
AC_MSG_ERROR([Unable to find gd.h anywhere under $PHP_GD])
|
||||
else
|
||||
AC_MSG_ERROR([Unable to find libgd.(a|so) anywhere under $PHP_GD])
|
||||
fi
|
||||
|
||||
PHP_EXPAND_PATH($GD_INCLUDE, GD_INCLUDE)
|
||||
dnl Library path
|
||||
|
||||
dnl
|
||||
dnl Check for gd 2.0.4 greater availability
|
||||
dnl
|
||||
old_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=-I$GD_INCLUDE
|
||||
AC_TRY_COMPILE([
|
||||
#include <gd.h>
|
||||
#include <stdlib.h>
|
||||
], [
|
||||
gdIOCtx *ctx;
|
||||
ctx = malloc(sizeof(gdIOCtx));
|
||||
ctx->gd_free = 1;
|
||||
], [
|
||||
AC_DEFINE(HAVE_LIBGD204, 1, [ ])
|
||||
PHP_CHECK_LIBRARY(gd, gdSetErrorMethod,
|
||||
[
|
||||
PHP_ADD_LIBRARY_WITH_PATH(gd, $PHP_GD/$PHP_LIBDIR, GD_SHARED_LIBADD)
|
||||
AC_DEFINE(HAVE_LIBGD, 1, [ ])
|
||||
],[
|
||||
AC_MSG_ERROR([Unable to find libgd.(a|so) >= 2.1.0 anywhere under $PHP_GD])
|
||||
],[
|
||||
-L$PHP_GD/$PHP_LIBDIR
|
||||
])
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
PHP_GD_CHECK_VERSION
|
||||
|
||||
PHP_EXPAND_PATH($GD_INCLUDE, GD_INCLUDE)
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -445,9 +381,8 @@ dnl
|
||||
if test "$PHP_GD" != "no"; then
|
||||
PHP_NEW_EXTENSION(gd, gd.c $extra_sources, $ext_shared,, \\$(GDLIB_CFLAGS))
|
||||
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/libgd)
|
||||
|
||||
if test "$GD_MODULE_TYPE" = "builtin"; then
|
||||
if test "$GD_MODULE_TYPE" = "builtin"; then
|
||||
PHP_ADD_BUILD_DIR($ext_builddir/libgd)
|
||||
GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
|
||||
GD_HEADER_DIRS="ext/gd/ ext/gd/libgd/"
|
||||
|
||||
@ -460,7 +395,7 @@ if test "$PHP_GD" != "no"; then
|
||||
PHP_ADD_INCLUDE($GD_INCLUDE)
|
||||
PHP_CHECK_LIBRARY(gd, gdImageCreate, [], [
|
||||
AC_MSG_ERROR([GD build test failed. Please check the config.log for details.])
|
||||
], [ -L$GD_LIB $GD_SHARED_LIBADD ])
|
||||
], [ $GD_SHARED_LIBADD ])
|
||||
fi
|
||||
|
||||
PHP_INSTALL_HEADERS([$GD_HEADER_DIRS])
|
||||
|
@ -69,7 +69,7 @@ if (PHP_GD != "no") {
|
||||
/D HAVE_GD_WBMP \
|
||||
/D HAVE_GD_XBM \
|
||||
/D HAVE_GD_XPM \
|
||||
/D HAVE_LIBFREETYPE=1 \
|
||||
/D HAVE_GD_FREETYPE=1 \
|
||||
/D HAVE_LIBGD13=1 \
|
||||
/D HAVE_LIBGD15=1 \
|
||||
/D HAVE_LIBGD20=1 \
|
||||
|
491
ext/gd/gd.c
491
ext/gd/gd.c
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,5 @@
|
||||
#include "php_config.h"
|
||||
#include "php_config.h"
|
||||
|
||||
#ifdef HAVE_GD_PNG
|
||||
/* needs to be first */
|
||||
# include <png.h>
|
||||
@ -8,6 +9,9 @@
|
||||
# include <jpeglib.h>
|
||||
#endif
|
||||
|
||||
#include "gd_compat.h"
|
||||
#include "php.h"
|
||||
|
||||
#ifdef HAVE_GD_JPG
|
||||
int gdJpegGetVersionInt()
|
||||
{
|
||||
@ -20,6 +24,15 @@ const char * gdJpegGetVersionString()
|
||||
case 62:
|
||||
return "6b";
|
||||
break;
|
||||
|
||||
case 70:
|
||||
return "7";
|
||||
break;
|
||||
|
||||
case 80:
|
||||
return "8";
|
||||
break;
|
||||
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
@ -33,50 +46,18 @@ const char * gdPngGetVersionString()
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Not exported by libgd, copied from gdhelpers.h */
|
||||
int overflow2(int a, int b)
|
||||
{
|
||||
TSRMLS_FETCH();
|
||||
|
||||
if(a <= 0 || b <= 0) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n");
|
||||
return 1;
|
||||
}
|
||||
if(a > INT_MAX / b) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Not exported by libgd, copied from wbmp.c */
|
||||
int
|
||||
getmbi (int (*getin) (void *in), void *in)
|
||||
{
|
||||
int i, mbi = 0;
|
||||
|
||||
do
|
||||
{
|
||||
i = getin (in);
|
||||
if (i < 0)
|
||||
return (-1);
|
||||
mbi = (mbi << 7) | (i & 0x7f);
|
||||
}
|
||||
while (i & 0x80);
|
||||
|
||||
return (mbi);
|
||||
}
|
||||
|
||||
/* Not exported by libgd, copied from wbmp.c */
|
||||
int
|
||||
skipheader (int (*getin) (void *in), void *in)
|
||||
{
|
||||
int i;
|
||||
|
||||
do
|
||||
{
|
||||
i = getin (in);
|
||||
if (i < 0)
|
||||
return (-1);
|
||||
}
|
||||
while (i & 0x80);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
14
ext/gd/gd_compat.h
Normal file
14
ext/gd/gd_compat.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef GD_COMPAT_H
|
||||
#define GD_COMPAT_H 1
|
||||
|
||||
#ifndef HAVE_GD_BUNDLED
|
||||
/* from gd_compat.c */
|
||||
const char * gdPngGetVersionString();
|
||||
const char * gdJpegGetVersionString();
|
||||
int gdJpegGetVersionInt();
|
||||
#endif
|
||||
|
||||
/* from gd_compat.c of libgd/gd_security.c */
|
||||
int overflow2(int a, int b);
|
||||
|
||||
#endif /* GD_COMPAT_H */
|
@ -189,11 +189,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
|
||||
break;
|
||||
}
|
||||
|
||||
#if HAVE_LIBGD204
|
||||
ctx->gd_free(ctx);
|
||||
#else
|
||||
ctx->free(ctx);
|
||||
#endif
|
||||
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@
|
||||
#else
|
||||
#include <php_config.h>
|
||||
#endif
|
||||
#if HAVE_LIBFREETYPE && !defined(HAVE_GD_CACHE_CREATE)
|
||||
#if HAVE_LIBFREETYPE && !defined(HAVE_GD_BUNDLED)
|
||||
|
||||
#include "gdcache.h"
|
||||
|
||||
|
@ -1,69 +0,0 @@
|
||||
#ifndef GD_COMPAT_H
|
||||
#define GD_COMPAT_H 1
|
||||
|
||||
#if HAVE_GD_BUNDLED
|
||||
# include "gd.h"
|
||||
#else
|
||||
# include <gd.h>
|
||||
#endif
|
||||
|
||||
const char * gdPngGetVersionString();
|
||||
const char * gdJpegGetVersionString();
|
||||
int gdJpegGetVersionInt();
|
||||
int overflow2(int a, int b);
|
||||
int getmbi (int (*getin) (void *in), void *in);
|
||||
int skipheader (int (*getin) (void *in), void *in);
|
||||
|
||||
|
||||
/* filters section
|
||||
*
|
||||
* Negate the imag src, white becomes black,
|
||||
* The red, green, and blue intensities of an image are negated.
|
||||
* White becomes black, yellow becomes blue, etc.
|
||||
*/
|
||||
int gdImageNegate(gdImagePtr src);
|
||||
|
||||
/* Convert the image src to a grayscale image */
|
||||
int gdImageGrayScale(gdImagePtr src);
|
||||
|
||||
/* Set the brightness level <brightness> for the image src */
|
||||
int gdImageBrightness(gdImagePtr src, int brightness);
|
||||
|
||||
/* Set the contrast level <contrast> for the image <src> */
|
||||
int gdImageContrast(gdImagePtr src, double contrast);
|
||||
|
||||
/* Simply adds or substracts respectively red, green or blue to a pixel */
|
||||
int gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha);
|
||||
|
||||
#if !defined(HAVE_GD_IMAGE_CONVOLUTION)
|
||||
/* Image convolution by a 3x3 custom matrix */
|
||||
int gdImageConvolution(gdImagePtr src, float ft[3][3], float filter_div, float offset);
|
||||
int gdImageEdgeDetectQuick(gdImagePtr src);
|
||||
int gdImageGaussianBlur(gdImagePtr im);
|
||||
int gdImageSelectiveBlur( gdImagePtr src);
|
||||
int gdImageEmboss(gdImagePtr im);
|
||||
int gdImageMeanRemoval(gdImagePtr im);
|
||||
int gdImageSmooth(gdImagePtr im, float weight);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_GD_IMAGE_PIXELATE)
|
||||
enum gdPixelateMode {
|
||||
GD_PIXELATE_UPPERLEFT,
|
||||
GD_PIXELATE_AVERAGE
|
||||
};
|
||||
|
||||
int gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode);
|
||||
#endif
|
||||
|
||||
int gdImagePixelate(gdImagePtr im, int block_size, const unsigned int mode);
|
||||
|
||||
#if !HAVE_GD_IMAGEELLIPSE
|
||||
void gdImageEllipse(gdImagePtr im, int cx, int cy, int w, int h, int c);
|
||||
#endif
|
||||
|
||||
gdImagePtr gdImageRotate (gdImagePtr src, double dAngle, int clrBack, int ignoretransparent);
|
||||
|
||||
int gdImageColorMatch (gdImagePtr im1, gdImagePtr im2);
|
||||
|
||||
#endif
|
||||
|
@ -1690,8 +1690,8 @@ gdImagePtr gdImageRotateNearestNeighbour(gdImagePtr src, const float degrees, co
|
||||
unsigned int j;
|
||||
dst_offset_x = 0;
|
||||
for (j = 0; j < new_width; j++) {
|
||||
gdFixed f_i = gd_itofx(i - new_height/2);
|
||||
gdFixed f_j = gd_itofx(j-new_width/2);
|
||||
gdFixed f_i = gd_itofx((int)i - (int)new_height/2);
|
||||
gdFixed f_j = gd_itofx((int)j - (int)new_width/2);
|
||||
gdFixed f_m = gd_mulfx(f_j,f_sin) + gd_mulfx(f_i,f_cos) + f_0_5 + f_H;
|
||||
gdFixed f_n = gd_mulfx(f_j,f_cos) - gd_mulfx(f_i,f_sin) + f_0_5 + f_W;
|
||||
long m = gd_fxtoi(f_m);
|
||||
@ -1753,8 +1753,8 @@ gdImagePtr gdImageRotateGeneric(gdImagePtr src, const float degrees, const int b
|
||||
unsigned int j;
|
||||
dst_offset_x = 0;
|
||||
for (j = 0; j < new_width; j++) {
|
||||
gdFixed f_i = gd_itofx(i - new_height/ 2);
|
||||
gdFixed f_j = gd_itofx(j -new_width / 2);
|
||||
gdFixed f_i = gd_itofx((int)i - (int)new_height/ 2);
|
||||
gdFixed f_j = gd_itofx((int)j - (int)new_width / 2);
|
||||
gdFixed f_m = gd_mulfx(f_j,f_sin) + gd_mulfx(f_i,f_cos) + f_0_5 + f_H;
|
||||
gdFixed f_n = gd_mulfx(f_j,f_cos) - gd_mulfx(f_i,f_sin) + f_0_5 + f_W;
|
||||
long m = gd_fxtoi(f_m);
|
||||
@ -1814,8 +1814,8 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int
|
||||
dst_offset_x = 0;
|
||||
|
||||
for (j=0; j < new_width; j++) {
|
||||
const gdFixed f_i = gd_itofx(i-new_height/2);
|
||||
const gdFixed f_j = gd_itofx(j-new_width/2);
|
||||
const gdFixed f_i = gd_itofx((int)i - (int)new_height/2);
|
||||
const gdFixed f_j = gd_itofx((int)j - (int)new_width/2);
|
||||
const gdFixed f_m = gd_mulfx(f_j,f_sin) + gd_mulfx(f_i,f_cos) + f_0_5 + f_H;
|
||||
const gdFixed f_n = gd_mulfx(f_j,f_cos) - gd_mulfx(f_i,f_sin) + f_0_5 + f_W;
|
||||
const unsigned int m = gd_fxtoi(f_m);
|
||||
@ -1830,18 +1830,18 @@ gdImagePtr gdImageRotateBilinear(gdImagePtr src, const float degrees, const int
|
||||
const gdFixed f_w4 = gd_mulfx(f_f, f_g);
|
||||
|
||||
if (n < src_w - 1) {
|
||||
src_offset_x = m + 1;
|
||||
src_offset_y = n;
|
||||
src_offset_x = n + 1;
|
||||
src_offset_y = m;
|
||||
}
|
||||
|
||||
if (m < src_h-1) {
|
||||
src_offset_x = m;
|
||||
src_offset_y = n + 1;
|
||||
src_offset_x = n;
|
||||
src_offset_y = m + 1;
|
||||
}
|
||||
|
||||
if (!((n >= src_w-1) || (m >= src_h-1))) {
|
||||
src_offset_x = m + 1;
|
||||
src_offset_y = n + 1;
|
||||
src_offset_x = n + 1;
|
||||
src_offset_y = m + 1;
|
||||
}
|
||||
{
|
||||
const int pixel1 = src->tpixels[src_offset_y][src_offset_x];
|
||||
@ -1941,8 +1941,8 @@ gdImagePtr gdImageRotateBicubicFixed(gdImagePtr src, const float degrees, const
|
||||
dst_offset_x = 0;
|
||||
|
||||
for (j=0; j < new_width; j++) {
|
||||
const gdFixed f_i = gd_itofx(i-new_height/2);
|
||||
const gdFixed f_j = gd_itofx(j-new_width/2);
|
||||
const gdFixed f_i = gd_itofx((int)i - (int)new_height/2);
|
||||
const gdFixed f_j = gd_itofx((int)j - (int)new_width/2);
|
||||
const gdFixed f_m = gd_mulfx(f_j,f_sin) + gd_mulfx(f_i,f_cos) + f_0_5 + f_H;
|
||||
const gdFixed f_n = gd_mulfx(f_j,f_cos) - gd_mulfx(f_i,f_sin) + f_0_5 + f_W;
|
||||
const int m = gd_fxtoi(f_m);
|
||||
|
@ -22,15 +22,13 @@
|
||||
#ifndef PHP_GD_H
|
||||
#define PHP_GD_H
|
||||
|
||||
#define HAVE_GDIMAGECREATEFROMPNG 1
|
||||
|
||||
#if HAVE_LIBFREETYPE
|
||||
# ifndef ENABLE_GD_TTF
|
||||
# define ENABLE_GD_TTF
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if HAVE_LIBGD
|
||||
#if defined(HAVE_LIBGD) || defined(HAVE_GD_BUNDLED)
|
||||
|
||||
/* open_basedir and safe_mode checks */
|
||||
#define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg) \
|
||||
@ -69,10 +67,10 @@ extern zend_module_entry gd_module_entry;
|
||||
/* gd.c functions */
|
||||
PHP_MINFO_FUNCTION(gd);
|
||||
PHP_MINIT_FUNCTION(gd);
|
||||
#if HAVE_LIBT1 || HAVE_GD_FONTMUTEX
|
||||
#if HAVE_LIBT1
|
||||
PHP_MSHUTDOWN_FUNCTION(gd);
|
||||
#endif
|
||||
#if HAVE_GD_STRINGFT
|
||||
#if HAVE_GD_FREETYPE && HAVE_LIBFREETYPE
|
||||
PHP_RSHUTDOWN_FUNCTION(gd);
|
||||
#endif
|
||||
|
||||
@ -123,12 +121,12 @@ PHP_FUNCTION(imagegrabscreen);
|
||||
|
||||
PHP_FUNCTION(imagerotate);
|
||||
|
||||
#ifdef HAVE_GD_IMAGE_FLIP
|
||||
PHP_FUNCTION(imageflip);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GD_BUNDLED
|
||||
PHP_FUNCTION(imageantialias);
|
||||
#endif
|
||||
|
||||
PHP_FUNCTION(imagecrop);
|
||||
PHP_FUNCTION(imagecropauto);
|
||||
PHP_FUNCTION(imagescale);
|
||||
@ -136,7 +134,6 @@ PHP_FUNCTION(imageaffine);
|
||||
PHP_FUNCTION(imageaffinematrixget);
|
||||
PHP_FUNCTION(imageaffinematrixconcat);
|
||||
PHP_FUNCTION(imagesetinterpolation);
|
||||
#endif
|
||||
|
||||
PHP_FUNCTION(imagesetthickness);
|
||||
PHP_FUNCTION(imagecopymergegray);
|
||||
@ -154,7 +151,7 @@ PHP_FUNCTION(imagecreatefromwbmp);
|
||||
PHP_FUNCTION(imagecreatefromgd);
|
||||
PHP_FUNCTION(imagecreatefromgd2);
|
||||
PHP_FUNCTION(imagecreatefromgd2part);
|
||||
#if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
|
||||
#if defined(HAVE_GD_XPM)
|
||||
PHP_FUNCTION(imagecreatefromxpm);
|
||||
#endif
|
||||
|
||||
@ -205,10 +202,8 @@ PHP_FUNCTION(image2wbmp);
|
||||
|
||||
PHP_FUNCTION(imagecolormatch);
|
||||
|
||||
#if HAVE_GD_BUNDLED
|
||||
PHP_FUNCTION(imagelayereffect);
|
||||
PHP_FUNCTION(imagexbm);
|
||||
#endif
|
||||
|
||||
PHP_FUNCTION(imagefilter);
|
||||
PHP_FUNCTION(imageconvolution);
|
||||
|
@ -33,19 +33,19 @@ imagepng($g, "$cwd/bug43073.png");
|
||||
--CLEAN--
|
||||
<?php @unlink(dirname(__FILE__) . '/bug43073.png'); ?>
|
||||
--EXPECTF--
|
||||
(500, 402), (610, 402), (610, 376), (500, 376)
|
||||
(500, 40%d), (610, 40%d), (610, 376), (500, 376)
|
||||
(492, 363), (591, 322), (580, 295), (480, 336)
|
||||
(470, 331), (548, 254), (527, 233), (449, 310)
|
||||
(439, 309), (483, 202), (461, 193), (416, 299)
|
||||
(401, 300), (401, 183), (381, 183), (381, 300)
|
||||
(40%d, 300), (40%d, 183), (38%d, 183), (38%d, 300)
|
||||
(362, 307), (316, 195), (291, 205), (337, 318)
|
||||
(330, 329), (246, 244), (224, 265), (308, 350)
|
||||
(308, 360), (202, 316), (190, 344), (296, 388)
|
||||
(300, 399), (186, 399), (186, 425), (300, 425)
|
||||
(300, %d), (18%d, %d), (18%d, 425), (%d, 425)
|
||||
(306, 437), (195, 483), (206, 510), (318, 464)
|
||||
(328, 469), (240, 557), (260, 578), (349, 491)
|
||||
(359, 491), (312, 607), (334, 616), (382, 501)
|
||||
(398, 500), (398, 618), (418, 618), (418, 500)
|
||||
(%d, 500), (%d, 618), (41%d, 618), (41%d, 500)
|
||||
(436, 493), (483, 607), (507, 597), (461, 482)
|
||||
(468, 471), (555, 558), (577, 538), (490, 450)
|
||||
(490, 440), (600, 485), (611, 457), (502, 412)
|
||||
|
@ -20,6 +20,6 @@ echo '(' . $bbox[6] . ', ' . $bbox[7] . ")\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
(-1, 15)
|
||||
(155, 15)
|
||||
(155, -48)
|
||||
(15%d, 15)
|
||||
(15%d, -48)
|
||||
(-1, -48)
|
||||
|
@ -35,9 +35,9 @@ imagefilledellipse($image_lge, 200, 150, 300, 200, $col_ellipse);
|
||||
imagepng($image_lge, $dest_lge);
|
||||
|
||||
// Get new dimensions
|
||||
$percent = 0.5; // new image 50% of orginal
|
||||
$percent = 0.5; // new image 50% of original
|
||||
list($width, $height) = getimagesize($dest_lge);
|
||||
echo "Size of orginal: width=". $width . " height=" . $height . "\n";
|
||||
echo "Size of original: width=". $width . " height=" . $height . "\n";
|
||||
|
||||
$new_width = $width * $percent;
|
||||
$new_height = $height * $percent;
|
||||
@ -66,6 +66,6 @@ echo "Done\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
Simple test of imagecopyresampled() function
|
||||
Size of orginal: width=400 height=300
|
||||
Size of original: width=400 height=300
|
||||
Size of copy: width=200 height=150
|
||||
Done
|
||||
|
@ -3,7 +3,6 @@ imageloadfont() function crashes
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die("skip gd extension not available\n");
|
||||
if (!GD_BUNDLED) die('skip external GD libraries always fail');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
@ -659,6 +659,9 @@ PHP_FUNCTION(hash_pbkdf2)
|
||||
/* Setup Main Loop to build a long enough result */
|
||||
if (length == 0) {
|
||||
length = ops->digest_size;
|
||||
if (!raw_output) {
|
||||
length = length * 2;
|
||||
}
|
||||
}
|
||||
digest_length = length;
|
||||
if (!raw_output) {
|
||||
|
17
ext/hash/tests/bug64745.phpt
Normal file
17
ext/hash/tests/bug64745.phpt
Normal file
@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
Bug #64745 hash_pbkdf2() truncates data when using default length and hex output
|
||||
--SKIPIF--
|
||||
<?php extension_loaded('hash') or die('skip'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
$hash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0);
|
||||
$rawHash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0, true);
|
||||
|
||||
var_dump($hash);
|
||||
var_dump(bin2hex($rawHash));
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
string(40) "0c60c80f961f0e71f3a9b524af6012062fe037a6"
|
||||
string(40) "0c60c80f961f0e71f3a9b524af6012062fe037a6"
|
||||
|
@ -24,7 +24,7 @@ $supported_hash_al = array(
|
||||
"CRC32" => 4,
|
||||
"CRC32B" => 4,
|
||||
"ADLER32" => 4,
|
||||
"NA_XYZ" => 0 /* verify that the algorythm works */
|
||||
"NA_XYZ" => 0 /* verify that the algorithm works */
|
||||
);
|
||||
|
||||
$hc = mhash_count() + 1;
|
||||
|
@ -61,7 +61,7 @@ function displayOverviewFields($resp, $fields=null) {
|
||||
* @param string mailbox_suffix Suffix used to uniquely identify mailboxes
|
||||
* @param int message_count number of test msgs to be written to new mailbox
|
||||
*
|
||||
* @return IMAP stream to new mailbox on sucesss; FALSE on failure
|
||||
* @return IMAP stream to new mailbox on success; FALSE on failure
|
||||
*/
|
||||
function setup_test_mailbox($mailbox_suffix, $message_count, &$new_mailbox = null, $msg_type = "simple"){
|
||||
global $server, $default_mailbox, $username, $password;
|
||||
|
@ -18,7 +18,7 @@ InterBase: transactions
|
||||
|
||||
/*
|
||||
Difference between default and other transactions:
|
||||
default commited when you call ibase_close().
|
||||
default committed when you call ibase_close().
|
||||
Other transaction doing rollback.
|
||||
|
||||
If you not open default transaction with
|
||||
@ -158,7 +158,7 @@ three transaction on default link
|
||||
|
||||
ibase_free_result($res);
|
||||
|
||||
/* tr_4 IBASE_COMMITED + IBASE_REC_NO_VERSION + IBASE_NOWAIT */
|
||||
/* tr_4 IBASE_COMMITTED + IBASE_REC_NO_VERSION + IBASE_NOWAIT */
|
||||
$res = ibase_query($tr_4, "select * from test5");
|
||||
|
||||
echo "three rows in fourth transaction with deadlock\n";
|
||||
|
@ -18,7 +18,7 @@ message set by the PHP wrapping code, not by ICU. The message should include the
|
||||
name of the function that failed in order to make debugging easier (though if
|
||||
you activate warnings with intl.error_level or exceptions with
|
||||
intl.use_exceptions you get more fine-grained information about where the
|
||||
error ocurred).
|
||||
error occurred).
|
||||
|
||||
The internal PHP code can set the global last error with:
|
||||
void intl_error_set_code(intl_error* err, UErrorCode err_code TSRMLS_DC);
|
||||
|
@ -7,7 +7,7 @@ Examle of locales format: 'en_US', 'ru_UA', 'ua_UA' (see http://demo.icu-project
|
||||
|
||||
|
||||
2. Collator::getDisplayName( $obj_locale, $disp_locale ).
|
||||
Get name of the object for the desired Locale, in the desired langauge. Both arguments
|
||||
Get name of the object for the desired Locale, in the desired language. Both arguments
|
||||
must be from getAvailableLocales method.
|
||||
|
||||
@param string $obj_locale Locale to get display name for.
|
||||
|
@ -98,7 +98,7 @@
|
||||
* @param string $haystack The input string.
|
||||
* @param string $needle The string to look for.
|
||||
* @param [boolean] $before_needle If TRUE (the default is FALSE), grapheme_strstr() returns the part of the
|
||||
haystack before the first occurence of the needle.
|
||||
haystack before the first occurrence of the needle.
|
||||
* @return string Returns the portion of string, or FALSE if needle is not found.
|
||||
*/
|
||||
function grapheme_strstr($haystack, $needle, $before_needle = FALSE) {}
|
||||
@ -109,7 +109,7 @@
|
||||
* @param string $haystack The input string.
|
||||
* @param string $needle The string to look for.
|
||||
* @param [boolean] $before_needle If TRUE (the default is FALSE), grapheme_strstr() returns the part of the
|
||||
haystack before the first occurence of the needle.
|
||||
haystack before the first occurrence of the needle.
|
||||
* @return string Returns the portion of string, or FALSE if needle is not found.
|
||||
*/
|
||||
function grapheme_stristr($haystack, $needle, $before_needle = FALSE) {}
|
||||
|
@ -31,7 +31,7 @@ class MessageFormatter {
|
||||
/**
|
||||
* Format the message
|
||||
* @param array $args arguments to insert into the pattern string
|
||||
* @return string the formatted string, or false if an error ocurred
|
||||
* @return string the formatted string, or false if an error occurred
|
||||
*/
|
||||
public function format($args) {}
|
||||
|
||||
@ -124,7 +124,7 @@ class MessageFormatter {
|
||||
* Format the message
|
||||
* @param MessageFormatter $fmt The message formatter
|
||||
* @param array $args arguments to insert into the pattern string
|
||||
* @return string the formatted string, or false if an error ocurred
|
||||
* @return string the formatted string, or false if an error occurred
|
||||
*/
|
||||
function msgfmt_format($fmt, $args) {}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
Check that bad argumens return the same
|
||||
Check that bad arguments return the same
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
|
@ -8,7 +8,7 @@ error_reporting=E_ALL & ~E_NOTICE
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
* Note: Using error_reporting=E_ALL & ~E_NOTICE to supress "Trying to get property of non-object" notices.
|
||||
* Note: Using error_reporting=E_ALL & ~E_NOTICE to suppress "Trying to get property of non-object" notices.
|
||||
*/
|
||||
class StreamExploiter {
|
||||
public function stream_close ( ) {
|
||||
|
@ -408,7 +408,7 @@ o i18n.script_encoding - script encoding
|
||||
entering the script parser.
|
||||
|
||||
Be aware that auto detection may fail under some conditions.
|
||||
For best auto detection, add multibyte charactor at begining of
|
||||
For best auto detection, add multibyte charactor at beginning of
|
||||
script.
|
||||
|
||||
|
||||
|
@ -4643,7 +4643,7 @@ static const int ucs_r2_jisx0213_min = 0xFA0F;
|
||||
static const int ucs_r2_jisx0213_max = 0xFA6A;
|
||||
|
||||
/*
|
||||
CJK Compatibility Ideographs: U+F900 - U+FAFF (seperate mapping for U+F9XX)
|
||||
CJK Compatibility Ideographs: U+F900 - U+FAFF (separate mapping for U+F9XX)
|
||||
*/
|
||||
static const unsigned short ucs_r2b_jisx0213_cmap_key[] = {
|
||||
0xf91d,0xf928,0xf929,0xf936,0xf970,0xf9d0,0xf9dc};
|
||||
|
@ -1812,7 +1812,7 @@ History
|
||||
2003/01/31: [impl] rename TTRANS() to TOLOWER().
|
||||
2003/01/30: [bug] .c.o --> .c.obj in win32\Makefile.
|
||||
2003/01/30: [impl] add -DNOT_RUBY to Makefile.in.
|
||||
NOT_RUBY is refered in regint.h for escape double
|
||||
NOT_RUBY is referred in regint.h for escape double
|
||||
including config.h.
|
||||
2003/01/30: [impl] when string hasn't case ambiguity, don't compile
|
||||
to ignore case opcode.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user