mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-25 18:05:42 +00:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0843bcd6f6 |
No files matched your search
@@ -15,7 +15,6 @@ ext/dba/libflatfile/flatfile.c ident
|
||||
ext/dba/libcdb/cdb_make.c ident
|
||||
ext/dba/libcdb/cdb.c ident
|
||||
ext/filter/filter.c ident
|
||||
ext/zip/php_zip.c ident
|
||||
README.input_filter ident
|
||||
run-tests.php ident
|
||||
sapi/nsapi/nsapi.c ident
|
||||
|
||||
@@ -24,7 +24,6 @@ Installing PHP
|
||||
+ Installing a PHP extension on Windows
|
||||
+ Compiling shared PECL extensions with the pecl command
|
||||
+ Compiling shared PECL extensions with phpize
|
||||
+ php-config
|
||||
+ Compiling PECL extensions statically into PHP
|
||||
* Problems?
|
||||
+ Read the FAQ
|
||||
@@ -84,7 +83,7 @@ General Installation Considerations
|
||||
With PHP you can also write desktop GUI applications using the PHP-GTK
|
||||
extension. This is a completely different approach than writing web
|
||||
pages, as you do not output any HTML, but manage windows and objects
|
||||
within them. For more information about PHP-GTK, please » visit the
|
||||
within them. For more information about PHP-GTK, please » visit the
|
||||
site dedicated to this extension. PHP-GTK is not included in the
|
||||
official PHP distribution.
|
||||
|
||||
@@ -93,9 +92,9 @@ General Installation Considerations
|
||||
will also find information on the command line executable in the
|
||||
following sections.
|
||||
|
||||
PHP source code and binary distributions for Windows can be found at
|
||||
» http://www.php.net/downloads.php. We recommend you to choose a
|
||||
» mirror nearest to you for downloading the distributions.
|
||||
PHP source code and binary distributions for Windows can be found at »
|
||||
http://www.php.net/downloads.php. We recommend you to choose a » mirror
|
||||
nearest to you for downloading the distributions.
|
||||
__________________________________________________________________
|
||||
__________________________________________________________________
|
||||
|
||||
@@ -141,9 +140,9 @@ Table of Contents
|
||||
* A web server
|
||||
* Any module specific components (such as GD, PDF libs, etc.)
|
||||
|
||||
When building directly from Git sources or after custom modifications
|
||||
When building directly from SVN sources or after custom modifications
|
||||
you might also need:
|
||||
* autoconf: 2.13+ (for PHP < 5.4.0), 2.59+ (for PHP >= 5.4.0)
|
||||
* autoconf: 2.13
|
||||
* automake: 1.4+
|
||||
* libtool: 1.4.x+ (except 1.4.2)
|
||||
* re2c: Version 0.13.4 or newer
|
||||
@@ -376,12 +375,12 @@ Apache 2.x on Unix systems
|
||||
For information on why, read the related FAQ entry on using Apache2
|
||||
with a threaded MPM
|
||||
|
||||
The » Apache Documentation is the most authoritative source of
|
||||
The » Apache Documentation is the most authoritative source of
|
||||
information on the Apache 2.x server. More information about
|
||||
installation options for Apache may be found there.
|
||||
|
||||
The most recent version of Apache HTTP Server may be obtained from
|
||||
» Apache download site, and a fitting PHP version from the above
|
||||
The most recent version of Apache HTTP Server may be obtained from »
|
||||
Apache download site, and a fitting PHP version from the above
|
||||
mentioned places. This quick guide covers only the basics to get
|
||||
started with Apache 2.x and PHP. For more information read the » Apache
|
||||
Documentation. The version numbers have been omitted here, to ensure
|
||||
@@ -499,7 +498,7 @@ service httpd restart
|
||||
|
||||
This should not be undertaken without being aware of the consequences
|
||||
of this decision, and having at least a fair understanding of the
|
||||
implications. The Apache documentation regarding » MPM-Modules
|
||||
implications. The Apache documentation regarding » MPM-Modules
|
||||
discusses MPMs in a great deal more detail.
|
||||
|
||||
Note:
|
||||
@@ -521,7 +520,7 @@ Lighttpd 1.4 on Unix systems
|
||||
This section contains notes and hints specific to Lighttpd 1.4 installs
|
||||
of PHP on Unix systems.
|
||||
|
||||
Please use the » Lighttpd trac to learn how to install Lighttpd
|
||||
Please use the » Lighttpd trac to learn how to install Lighttpd
|
||||
properly before continuing.
|
||||
|
||||
Fastcgi is the preferred SAPI to connect PHP and Lighttpd. Fastcgi is
|
||||
@@ -628,15 +627,15 @@ Sun, iPlanet and Netscape servers on Sun Solaris
|
||||
current web servers read the note about subrequests.
|
||||
|
||||
You can find more information about setting up PHP for the Netscape
|
||||
Enterprise Server (NES) here:
|
||||
» http://benoit.noss.free.fr/php/install-php4.html
|
||||
Enterprise Server (NES) here: »
|
||||
http://benoit.noss.free.fr/php/install-php4.html
|
||||
|
||||
To build PHP with Sun JSWS/Sun ONE WS/iPlanet/Netscape web servers,
|
||||
enter the proper install directory for the --with-nsapi=[DIR] option.
|
||||
The default directory is usually /opt/netscape/suitespot/. Please also
|
||||
read /php-xxx-version/sapi/nsapi/nsapi-readme.txt.
|
||||
|
||||
1. Install the following packages from » http://www.sunfreeware.com/
|
||||
1. Install the following packages from » http://www.sunfreeware.com/
|
||||
or another download site:
|
||||
+ autoconf-2.13
|
||||
+ automake-1.4
|
||||
@@ -838,7 +837,7 @@ Testing
|
||||
Using Variables
|
||||
|
||||
Some server supplied environment variables are not defined in the
|
||||
current » CGI/1.1 specification. Only the following variables are
|
||||
current » CGI/1.1 specification. Only the following variables are
|
||||
defined there: AUTH_TYPE, CONTENT_LENGTH, CONTENT_TYPE,
|
||||
GATEWAY_INTERFACE, PATH_INFO, PATH_TRANSLATED, QUERY_STRING,
|
||||
REMOTE_ADDR, REMOTE_HOST, REMOTE_IDENT, REMOTE_USER, REQUEST_METHOD,
|
||||
@@ -856,20 +855,20 @@ HP-UX specific installation notes
|
||||
There are two main options for installing PHP on HP-UX systems. Either
|
||||
compile it, or install a pre-compiled binary.
|
||||
|
||||
Official pre-compiled packages are located here:
|
||||
» http://software.hp.com/
|
||||
Official pre-compiled packages are located here: »
|
||||
http://software.hp.com/
|
||||
|
||||
Until this manual section is rewritten, the documentation about
|
||||
compiling PHP (and related extensions) on HP-UX systems has been
|
||||
removed. For now, consider reading the following external resource:
|
||||
» Building Apache and PHP on HP-UX 11.11
|
||||
removed. For now, consider reading the following external resource: »
|
||||
Building Apache and PHP on HP-UX 11.11
|
||||
__________________________________________________________________
|
||||
__________________________________________________________________
|
||||
|
||||
OpenBSD installation notes
|
||||
|
||||
This section contains notes and hints specific to installing PHP on
|
||||
» OpenBSD 3.6.
|
||||
This section contains notes and hints specific to installing PHP on »
|
||||
OpenBSD 3.6.
|
||||
|
||||
Using Binary Packages
|
||||
|
||||
@@ -901,12 +900,12 @@ Using Binary Packages
|
||||
(install the PEAR libraries)
|
||||
# pkg_add php4-pear-4.3.8.tgz
|
||||
|
||||
Read the » packages(7) manual page for more information about binary
|
||||
Read the » packages(7) manual page for more information about binary
|
||||
packages on OpenBSD.
|
||||
|
||||
Using Ports
|
||||
|
||||
You can also compile up PHP from source using the » ports tree.
|
||||
You can also compile up PHP from source using the » ports tree.
|
||||
However, this is only recommended for users familiar with OpenBSD. The
|
||||
PHP 4 port is split into two sub-directories: core and extensions. The
|
||||
extensions directory generates sub-packages for all of the supported
|
||||
@@ -927,7 +926,7 @@ Common Problems
|
||||
automatically installs into the correct chroot directories, so no
|
||||
special modification is needed there. More information on the
|
||||
OpenBSD Apache is available in the » OpenBSD FAQ.
|
||||
* The OpenBSD 3.6 package for the » gd extension requires XFree86 to
|
||||
* The OpenBSD 3.6 package for the » gd extension requires XFree86 to
|
||||
be installed. If you do not wish to use some of the font features
|
||||
that require X11, install the php4-gd-4.3.8-no_x11.tgz package
|
||||
instead.
|
||||
@@ -952,26 +951,18 @@ Required software
|
||||
|
||||
Solaris installs often lack C compilers and their related tools. Read
|
||||
this FAQ for information on why using GNU versions for some of these
|
||||
tools is necessary.
|
||||
|
||||
For unpacking the PHP distribution you need
|
||||
* tar
|
||||
* gzip or
|
||||
* bzip2
|
||||
|
||||
For compiling PHP you need
|
||||
tools is necessary. The required software is as follows:
|
||||
* gcc (recommended, other C compilers may work)
|
||||
* make
|
||||
* GNU sed
|
||||
|
||||
For building extra extensions or hacking the code of PHP you might also
|
||||
need
|
||||
* flex (up to PHP 5.2)
|
||||
* re2c
|
||||
* flex
|
||||
* bison
|
||||
* m4
|
||||
* autoconf
|
||||
* automake
|
||||
* perl
|
||||
* gzip
|
||||
* tar
|
||||
* GNU sed
|
||||
|
||||
In addition, you will need to install (and possibly compile) any
|
||||
additional software specific to your configuration, such as Oracle or
|
||||
@@ -980,16 +971,14 @@ Required software
|
||||
Using Packages
|
||||
|
||||
You can simplify the Solaris install process by using pkgadd to install
|
||||
most of your needed components. The Image Packaging System (IPS) for
|
||||
Solaris 11 Express also contains most of the required components for
|
||||
installation using the pkg command.
|
||||
most of your needed components.
|
||||
__________________________________________________________________
|
||||
__________________________________________________________________
|
||||
|
||||
Debian GNU/Linux installation notes
|
||||
|
||||
This section contains notes and hints specific to installing PHP on
|
||||
» Debian GNU/Linux.
|
||||
This section contains notes and hints specific to installing PHP on »
|
||||
Debian GNU/Linux.
|
||||
Warning
|
||||
|
||||
Unofficial builds from third-parties are not supported here. Any bugs
|
||||
@@ -1216,7 +1205,6 @@ Table of Contents
|
||||
* Installing a PHP extension on Windows
|
||||
* Compiling shared PECL extensions with the pecl command
|
||||
* Compiling shared PECL extensions with phpize
|
||||
* php-config
|
||||
* Compiling PECL extensions statically into PHP
|
||||
__________________________________________________________________
|
||||
|
||||
@@ -1239,8 +1227,8 @@ Introduction to PECL Installations
|
||||
To this php.ini file, or through the use of the dl() function.
|
||||
|
||||
When building PHP modules, it's important to have known-good versions
|
||||
of the required tools (autoconf, automake, libtool, etc.) See the
|
||||
» Anonymous Git Instructions for details on the required tools, and
|
||||
of the required tools (autoconf, automake, libtool, etc.) See the »
|
||||
Anonymous SVN Instructions for details on the required tools, and
|
||||
required versions.
|
||||
__________________________________________________________________
|
||||
__________________________________________________________________
|
||||
@@ -1259,7 +1247,7 @@ Downloading PECL extensions
|
||||
the PECL web site are available for download and installation using
|
||||
the » pecl command. Specific revisions may also be specified.
|
||||
* SVN Most PECL extensions also reside in SVN. A web-based view may
|
||||
be seen at » http://svn.php.net/viewvc/pecl/. To download straight
|
||||
be seen at » http://svn.php.net/viewvc/pecl/. To download straight
|
||||
from SVN, the following sequence of commands may be used:
|
||||
$ svn checkout http://svn.php.net/repository/pecl/extname/trunk
|
||||
extname
|
||||
@@ -1291,7 +1279,7 @@ Where to find an extension?
|
||||
|
||||
PHP extensions are usually called "php_*.dll" (where the star
|
||||
represents the name of the extension) and they are located under the
|
||||
"PHP\ext" ("PHP\extensions" in PHP 4) folder.
|
||||
"PHP\ext" ("PHP\extensions" in PHP4) folder.
|
||||
|
||||
PHP ships with the extensions most useful to the majority of
|
||||
developers. They are called "core" extensions.
|
||||
@@ -1377,7 +1365,7 @@ Resolving problems
|
||||
|
||||
Compiling shared PECL extensions with the pecl command
|
||||
|
||||
PECL makes it easy to create shared PHP extensions. Using the » pecl
|
||||
PECL makes it easy to create shared PHP extensions. Using the » pecl
|
||||
command, do the following:
|
||||
|
||||
$ pecl install extname
|
||||
@@ -1436,51 +1424,6 @@ $ make
|
||||
__________________________________________________________________
|
||||
__________________________________________________________________
|
||||
|
||||
php-config
|
||||
|
||||
php-config is a simple shell script for obtaining information about the
|
||||
installed PHP configuration.
|
||||
|
||||
When compiling extensions, if you have multiple PHP versions installed,
|
||||
you may specify for which installation you'd like to build by using the
|
||||
--with-php-config option during configuration, specifying the path of
|
||||
the respective php-config script.
|
||||
|
||||
The list of command line options provided by the php-config script can
|
||||
be queried anytime by running php-config with the -h switch:
|
||||
Usage: /usr/local/bin/php-config [OPTION]
|
||||
Options:
|
||||
--prefix [...]
|
||||
--includes [...]
|
||||
--ldflags [...]
|
||||
--libs [...]
|
||||
--extension-dir [...]
|
||||
--include-dir [...]
|
||||
--php-binary [...]
|
||||
--php-sapis [...]
|
||||
--configure-options [...]
|
||||
--version [...]
|
||||
--vernum [...]
|
||||
|
||||
CAPTION: Command line options
|
||||
|
||||
Option Description
|
||||
--prefix Directory prefix where PHP is installed, e.g. /usr/local
|
||||
--includes List of -I options with all include files
|
||||
--ldflags LD Flags which PHP was compiled with
|
||||
--libs Extra libraries which PHP was compiled with
|
||||
--extension-dir Directory where extensions are searched by default
|
||||
--include-dir Directory prefix where header files are installed by
|
||||
default
|
||||
--php-binary Full path to php CLI or CGI binary
|
||||
--php-sapis Show all SAPI modules available
|
||||
--configure-options Configure options to recreate configuration of
|
||||
current PHP installation
|
||||
--version PHP version
|
||||
--vernum PHP version as integer
|
||||
__________________________________________________________________
|
||||
__________________________________________________________________
|
||||
|
||||
Compiling PECL extensions statically into PHP
|
||||
|
||||
You might find that you need to build a PECL extension statically into
|
||||
@@ -1542,11 +1485,11 @@ Other problems
|
||||
If you are still stuck, someone on the PHP installation mailing list
|
||||
may be able to help you. You should check out the archive first, in
|
||||
case someone already answered someone else who had the same problem as
|
||||
you. The archives are available from the support page on
|
||||
» http://www.php.net/support.php. To subscribe to the PHP installation
|
||||
mailing list, send an empty mail to
|
||||
» php-install-subscribe@lists.php.net. The mailing list address is
|
||||
» php-install@lists.php.net.
|
||||
you. The archives are available from the support page on »
|
||||
http://www.php.net/support.php. To subscribe to the PHP installation
|
||||
mailing list, send an empty mail to »
|
||||
php-install-subscribe@lists.php.net. The mailing list address is »
|
||||
php-install@lists.php.net.
|
||||
|
||||
If you want to get help on the mailing list, please try to be precise
|
||||
and give the necessary details about your environment (which operating
|
||||
@@ -1561,11 +1504,11 @@ Bug reports
|
||||
If you think you have found a bug in PHP, please report it. The PHP
|
||||
developers probably don't know about it, and unless you report it,
|
||||
chances are it won't be fixed. You can report bugs using the
|
||||
bug-tracking system at » http://bugs.php.net/. Please do not send bug
|
||||
bug-tracking system at » http://bugs.php.net/. Please do not send bug
|
||||
reports in mailing list or personal letters. The bug system is also
|
||||
suitable to submit feature requests.
|
||||
|
||||
Read the » How to report a bug document before submitting any bug
|
||||
Read the » How to report a bug document before submitting any bug
|
||||
reports!
|
||||
__________________________________________________________________
|
||||
__________________________________________________________________
|
||||
@@ -1585,14 +1528,14 @@ The configuration file
|
||||
|
||||
The configuration file (php.ini) is read when PHP starts up. For the
|
||||
server module versions of PHP, this happens only once when the web
|
||||
server is started. For the CGI and CLI versions, it happens on every
|
||||
server is started. For the CGI and CLI version, it happens on every
|
||||
invocation.
|
||||
|
||||
php.ini is searched for in these locations (in order):
|
||||
php.ini is searched in these locations (in order):
|
||||
* SAPI module specific location (PHPIniDir directive in Apache 2, -c
|
||||
command line option in CGI and CLI, php_ini parameter in NSAPI,
|
||||
PHP_INI_PATH environment variable in THTTPD)
|
||||
* The PHPRC environment variable. Before PHP 5.2.0, this was checked
|
||||
* The PHPRC environment variable. Before PHP 5.2.0 this was checked
|
||||
after the registry key mentioned below.
|
||||
* As of PHP 5.2.0, the location of the php.ini file can be set for
|
||||
different versions of PHP. The following registry keys are examined
|
||||
@@ -1600,33 +1543,33 @@ The configuration file
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y] and
|
||||
[HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x], where x, y and z mean the PHP
|
||||
major, minor and release versions. If there is a value for
|
||||
IniFilePath in any of these keys, the first one found will be used
|
||||
as the location of the php.ini (Windows only).
|
||||
IniFilePath in these keys, then the first one found will be used as
|
||||
the location of the php.ini (Windows only).
|
||||
* [HKEY_LOCAL_MACHINE\SOFTWARE\PHP], value of IniFilePath (Windows
|
||||
only).
|
||||
* Current working directory (except CLI).
|
||||
* Current working directory (except CLI)
|
||||
* The web server's directory (for SAPI modules), or directory of PHP
|
||||
(otherwise in Windows).
|
||||
(otherwise in Windows)
|
||||
* Windows directory (C:\windows or C:\winnt) (for Windows), or
|
||||
--with-config-file-path compile time option.
|
||||
--with-config-file-path compile time option
|
||||
|
||||
If php-SAPI.ini exists (where SAPI is the SAPI in use, so, for example,
|
||||
php-cli.ini or php-apache.ini), it is used instead of php.ini. The SAPI
|
||||
name can be determined with php_sapi_name().
|
||||
If php-SAPI.ini exists (where SAPI is used SAPI, so the filename is
|
||||
e.g. php-cli.ini or php-apache.ini), it's used instead of php.ini. SAPI
|
||||
name can be determined by php_sapi_name().
|
||||
|
||||
Note:
|
||||
|
||||
The Apache web server changes the directory to root at startup,
|
||||
The Apache web server changes the directory to root at startup
|
||||
causing PHP to attempt to read php.ini from the root filesystem if
|
||||
it exists.
|
||||
|
||||
The php.ini directives handled by extensions are documented on the
|
||||
respective pages of the extensions themselves. A list of the core
|
||||
directives is available in the appendix. Not all PHP directives are
|
||||
necessarily documented in this manual: for a complete list of
|
||||
The php.ini directives handled by extensions are documented
|
||||
respectively on the pages of the extensions themselves. The list of the
|
||||
core directives is available in the appendix. Probably not all PHP
|
||||
directives are documented in the manual though. For a complete list of
|
||||
directives available in your PHP version, please read your well
|
||||
commented php.ini file. Alternatively, you may find » the latest
|
||||
php.ini from Git helpful too.
|
||||
commented php.ini file. Alternatively, you may find the » the latest
|
||||
php.ini from SVN helpful too.
|
||||
|
||||
Example #1 php.ini example
|
||||
; any text on a line after an unquoted semicolon (;) is ignored
|
||||
@@ -1692,13 +1635,12 @@ Where a configuration setting may be set
|
||||
|
||||
CAPTION: Definition of PHP_INI_* modes
|
||||
|
||||
Mode Meaning
|
||||
PHP_INI_USER Entry can be set in user scripts (like with ini_set()) or
|
||||
in the Windows registry. Since PHP 5.3, entry can be set in .user.ini
|
||||
PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or
|
||||
.user.ini (since PHP 5.3)
|
||||
PHP_INI_SYSTEM Entry can be set in php.ini or httpd.conf
|
||||
PHP_INI_ALL Entry can be set anywhere
|
||||
Mode Value Meaning
|
||||
PHP_INI_USER 1 Entry can be set in user scripts (like with ini_set())
|
||||
or in the Windows registry
|
||||
PHP_INI_PERDIR 6 Entry can be set in php.ini, .htaccess or httpd.conf
|
||||
PHP_INI_SYSTEM 4 Entry can be set in php.ini or httpd.conf
|
||||
PHP_INI_ALL 7 Entry can be set anywhere
|
||||
__________________________________________________________________
|
||||
__________________________________________________________________
|
||||
|
||||
@@ -1846,9 +1788,13 @@ Installation
|
||||
each request to play in, further weaknesses are introduced into
|
||||
PHP's system.
|
||||
|
||||
If you want to use a threaded MPM, look at a FastCGI
|
||||
If you feel you have to use a threaded MPM, look at a FastCGI
|
||||
configuration where PHP is running in its own memory space.
|
||||
|
||||
And finally, this warning against using a threaded MPM is not as
|
||||
strong for Windows systems because most libraries on that
|
||||
platform tend to be threadsafe.
|
||||
|
||||
Unix/Windows: Where should my php.ini file be located?
|
||||
By default on Unix it should be in /usr/local/lib which is
|
||||
<install-path>/lib. Most people will want to change this at
|
||||
|
||||
@@ -1,45 +1,5 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
13 Sep 2012, PHP 5.3.17
|
||||
|
||||
- Core:
|
||||
. Fixed bug (segfault while build with zts and GOTO vm-kind). (Laruence)
|
||||
. Fixed bug #62955 (Only one directive is loaded from "Per Directory Values"
|
||||
Windows registry). (aserbulov at parallels dot com)
|
||||
. Fixed bug #62763 (register_shutdown_function and extending class).
|
||||
(Laruence)
|
||||
. Fixed bug #62744 (dangling pointers made by zend_disable_class). (Laruence)
|
||||
. Fixed bug #62716 (munmap() is called with the incorrect length).
|
||||
(slangley@google.com)
|
||||
. Fixed bug ##62460 (php binaries installed as binary.dSYM). (Reeze Xia)
|
||||
|
||||
- CURL:
|
||||
. Fixed bug #62839 (curl_copy_handle segfault with CURLOPT_FILE). (Pierrick)
|
||||
|
||||
- DateTime:
|
||||
. Fixed bug #62852 (Unserialize invalid DateTime causes crash).
|
||||
(reeze.xia@gmail.com)
|
||||
|
||||
- Intl:
|
||||
. Fix null pointer dereferences in some classes of ext/intl. (Gustavo)
|
||||
|
||||
- MySQLnd:
|
||||
. Fixed bug #62885 (mysqli_poll - Segmentation fault). (Laruence)
|
||||
|
||||
- PDO:
|
||||
. Fixed bug #62685 (Wrong return datatype in PDO::inTransaction()). (Laruence)
|
||||
|
||||
- Session:
|
||||
. Fixed bug (segfault due to retval is not initialized). (Laruence)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray)
|
||||
(Laruence)
|
||||
|
||||
- Enchant:
|
||||
. Fixed bug #62838 (enchant_dict_quick_check() destroys zval, but fails to
|
||||
initialize it). (Tony, Mateusz Goik).
|
||||
|
||||
16 Aug 2012, PHP 5.3.16
|
||||
|
||||
- Core:
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--TEST--
|
||||
Bug #62763 (register_shutdown_function and extending class)
|
||||
--FILE--
|
||||
<?php
|
||||
class test1 {
|
||||
public function __construct() {
|
||||
register_shutdown_function(array($this, 'shutdown'));
|
||||
}
|
||||
public function shutdown() {
|
||||
exit(__METHOD__);
|
||||
}
|
||||
}
|
||||
|
||||
class test2 extends test1 {
|
||||
public function __destruct() {
|
||||
exit (__METHOD__);
|
||||
}
|
||||
}
|
||||
new test1;
|
||||
new test2;
|
||||
?>
|
||||
--EXPECT--
|
||||
test1::shutdowntest2::__destruct
|
||||
+9
-5
@@ -2342,15 +2342,16 @@ static const zend_function_entry disabled_class_new[] = {
|
||||
|
||||
ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_class_entry **disabled_class;
|
||||
zend_class_entry disabled_class;
|
||||
|
||||
zend_str_tolower(class_name, class_name_length);
|
||||
if (zend_hash_find(CG(class_table), class_name, class_name_length+1, (void **)&disabled_class)==FAILURE) {
|
||||
if (zend_hash_del(CG(class_table), class_name, class_name_length+1)==FAILURE) {
|
||||
return FAILURE;
|
||||
}
|
||||
INIT_CLASS_ENTRY_INIT_METHODS((**disabled_class), disabled_class_new, NULL, NULL, NULL, NULL, NULL);
|
||||
(*disabled_class)->create_object = display_disabled_class;
|
||||
zend_hash_clean(&((*disabled_class)->function_table));
|
||||
INIT_OVERLOADED_CLASS_ENTRY_EX(disabled_class, class_name, class_name_length, disabled_class_new, NULL, NULL, NULL, NULL, NULL);
|
||||
disabled_class.create_object = display_disabled_class;
|
||||
disabled_class.name_length = class_name_length;
|
||||
zend_register_internal_class(&disabled_class TSRMLS_CC);
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
@@ -2424,6 +2425,7 @@ static int zend_is_callable_check_class(const char *name, int name_len, zend_fca
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fcall_info_cache *fcc, int strict_class, char **error TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zend_class_entry *ce_org = fcc->calling_scope;
|
||||
@@ -2445,9 +2447,11 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
|
||||
/* Skip leading \ */
|
||||
if (Z_STRVAL_P(callable)[0] == '\\') {
|
||||
mlen = Z_STRLEN_P(callable) - 1;
|
||||
mname = Z_STRVAL_P(callable) + 1;
|
||||
lmname = zend_str_tolower_dup(Z_STRVAL_P(callable) + 1, mlen);
|
||||
} else {
|
||||
mlen = Z_STRLEN_P(callable);
|
||||
mname = Z_STRVAL_P(callable);
|
||||
lmname = zend_str_tolower_dup(Z_STRVAL_P(callable), mlen);
|
||||
}
|
||||
/* Check if function with given name exists.
|
||||
|
||||
@@ -170,11 +170,6 @@ typedef struct _zend_fcall_info_cache {
|
||||
int _len = class_name_len; \
|
||||
class_container.name = zend_strndup(class_name, _len); \
|
||||
class_container.name_length = _len; \
|
||||
INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
|
||||
}
|
||||
|
||||
#define INIT_CLASS_ENTRY_INIT_METHODS(class_container, functions, handle_fcall, handle_propget, handle_propset, handle_propunset, handle_propisset) \
|
||||
{ \
|
||||
class_container.builtin_functions = functions; \
|
||||
class_container.constructor = NULL; \
|
||||
class_container.destructor = NULL; \
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ static size_t zend_stream_stdio_fsizer(void *handle TSRMLS_DC) /* {{{ */
|
||||
static void zend_stream_unmap(zend_stream *stream TSRMLS_DC) { /* {{{ */
|
||||
#if HAVE_MMAP
|
||||
if (stream->mmap.map) {
|
||||
munmap(stream->mmap.map, stream->mmap.len + ZEND_MMAP_AHEAD);
|
||||
munmap(stream->mmap.map, stream->mmap.len);
|
||||
} else
|
||||
#endif
|
||||
if (stream->mmap.buf) {
|
||||
|
||||
@@ -4,8 +4,8 @@ ZEND_API void {%EXECUTOR_NAME%}(zend_op_array *op_array TSRMLS_DC)
|
||||
{
|
||||
zend_execute_data *execute_data;
|
||||
zend_bool nested = 0;
|
||||
zend_bool original_in_execution = EG(in_execution);
|
||||
{%HELPER_VARS%}
|
||||
{%EXECUTION_STATUS%}
|
||||
|
||||
{%INTERNAL_LABELS%}
|
||||
|
||||
|
||||
@@ -850,13 +850,6 @@ function gen_executor($f, $skl, $spec, $kind, $executor_name, $initializer_name,
|
||||
skip_blanks($f, $m[1], $m[3]."\n");
|
||||
}
|
||||
break;
|
||||
case "EXECUTION_STATUS":
|
||||
if ($kind != ZEND_VM_KIND_GOTO) {
|
||||
out($f, $m[1] . "zend_bool original_in_execution = EG(in_execution);\n");
|
||||
} else {
|
||||
out($f, $m[1] . "zend_bool original_in_execution = op_array? EG(in_execution) : 0;\n");
|
||||
}
|
||||
break;
|
||||
case "INTERNAL_LABELS":
|
||||
if ($kind == ZEND_VM_KIND_GOTO) {
|
||||
// Emit array of labels of opcode handlers and code for
|
||||
|
||||
+3
-3
@@ -41,7 +41,7 @@ AC_CONFIG_HEADER(main/php_config.h)
|
||||
|
||||
PHP_MAJOR_VERSION=5
|
||||
PHP_MINOR_VERSION=3
|
||||
PHP_RELEASE_VERSION=17
|
||||
PHP_RELEASE_VERSION=16
|
||||
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`
|
||||
@@ -1335,10 +1335,10 @@ PHP_CONFIGURE_PART(Configuring libtool)
|
||||
|
||||
LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
|
||||
|
||||
dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5, 10.6, 10.7 and 10.8.
|
||||
dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
|
||||
dnl This hack works around it. Ugly.
|
||||
case $host_alias in
|
||||
*darwin9*|*darwin10*|*darwin11*|*darwin12*)
|
||||
*darwin9*|*darwin10*)
|
||||
ac_cv_exeext=
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1610,9 +1610,9 @@ PHP_FUNCTION(curl_copy_handle)
|
||||
dupch->uses = 0;
|
||||
ch->uses++;
|
||||
if (ch->handlers->write->stream) {
|
||||
Z_ADDREF_P(ch->handlers->write->stream);
|
||||
Z_ADDREF_P(dupch->handlers->write->stream);
|
||||
dupch->handlers->write->stream = ch->handlers->write->stream;
|
||||
}
|
||||
dupch->handlers->write->stream = ch->handlers->write->stream;
|
||||
dupch->handlers->write->method = ch->handlers->write->method;
|
||||
dupch->handlers->write->type = ch->handlers->write->type;
|
||||
if (ch->handlers->read->stream) {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
--TEST--
|
||||
Bug #62839 (curl_copy_handle segfault with CURLOPT_FILE)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("curl")) print "skip";
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$curl = curl_init();
|
||||
|
||||
$fd = fopen('/tmp/test', 'wb');
|
||||
curl_setopt($curl, CURLOPT_FILE, $fd);
|
||||
|
||||
curl_copy_handle($curl);
|
||||
|
||||
echo 'DONE!';
|
||||
?>
|
||||
--EXPECTF--
|
||||
DONE!
|
||||
+4
-12
@@ -2544,9 +2544,6 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
|
||||
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS) {
|
||||
convert_to_long(*z_timezone_type);
|
||||
if (zend_hash_find(myht, "timezone", 9, (void**) &z_timezone) == SUCCESS) {
|
||||
zend_error_handling error_handling;
|
||||
|
||||
zend_replace_error_handling(EH_THROW, NULL, &error_handling TSRMLS_CC);
|
||||
convert_to_string(*z_timezone);
|
||||
|
||||
switch (Z_LVAL_PP(z_timezone_type)) {
|
||||
@@ -2554,9 +2551,9 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
|
||||
case TIMELIB_ZONETYPE_ABBR: {
|
||||
char *tmp = emalloc(Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2);
|
||||
snprintf(tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 2, "%s %s", Z_STRVAL_PP(z_date), Z_STRVAL_PP(z_timezone));
|
||||
php_date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 1 TSRMLS_CC);
|
||||
php_date_initialize(*dateobj, tmp, Z_STRLEN_PP(z_date) + Z_STRLEN_PP(z_timezone) + 1, NULL, NULL, 0 TSRMLS_CC);
|
||||
efree(tmp);
|
||||
break;
|
||||
return 1;
|
||||
}
|
||||
|
||||
case TIMELIB_ZONETYPE_ID:
|
||||
@@ -2570,15 +2567,10 @@ static int php_date_initialize_from_hash(zval **return_value, php_date_obj **dat
|
||||
tzobj->tzi.tz = tzi;
|
||||
tzobj->initialized = 1;
|
||||
|
||||
php_date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 1 TSRMLS_CC);
|
||||
php_date_initialize(*dateobj, Z_STRVAL_PP(z_date), Z_STRLEN_PP(z_date), NULL, tmp_obj, 0 TSRMLS_CC);
|
||||
zval_ptr_dtor(&tmp_obj);
|
||||
break;
|
||||
default:
|
||||
zend_restore_error_handling(&error_handling TSRMLS_CC);
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
zend_restore_error_handling(&error_handling TSRMLS_CC);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
--TEST--
|
||||
Bug #62852 (Unserialize invalid DateTime causes crash)
|
||||
--INI--
|
||||
date.timezone=GMT
|
||||
--FILE--
|
||||
<?php
|
||||
try {
|
||||
$datetime = unserialize('O:8:"DateTime":3:{s:4:"date";s:20:"10007-06-07 03:51:49";s:13:"timezone_type";i:3;s:8:"timezone";s:3:"UTC";}');
|
||||
var_dump($datetime);
|
||||
} catch (Exception $e) {
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "DateTime::__wakeup(): Failed to parse time string (%s) at position 12 (0): Double time specification"
|
||||
@@ -205,11 +205,7 @@ int dom_documenttype_internal_subset_read(dom_object *obj, zval **retval TSRMLS_
|
||||
if (buff != NULL) {
|
||||
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 0, 0, NULL);
|
||||
xmlOutputBufferFlush(buff);
|
||||
#ifdef LIBXML2_NEW_BUFFER
|
||||
ZVAL_STRINGL(*retval, xmlOutputBufferGetContent(buff), xmlOutputBufferGetSize(buff), 1);
|
||||
#else
|
||||
ZVAL_STRINGL(*retval, buff->buffer->content, buff->buffer->use, 1);
|
||||
#endif
|
||||
(void)xmlOutputBufferClose(buff);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
+2
-2
@@ -832,7 +832,7 @@ PHP_FUNCTION(dom_element_set_attribute_ns)
|
||||
}
|
||||
|
||||
if (errorcode == 0 && is_xmlns == 0) {
|
||||
xmlSetNsProp(elemp, nsptr, (xmlChar *)localname, (xmlChar *)value);
|
||||
attr = xmlSetNsProp(elemp, nsptr, (xmlChar *)localname, (xmlChar *)value);
|
||||
}
|
||||
} else {
|
||||
name_valid = xmlValidateName((xmlChar *) localname, 0);
|
||||
@@ -844,7 +844,7 @@ PHP_FUNCTION(dom_element_set_attribute_ns)
|
||||
if (attr != NULL && attr->type != XML_ATTRIBUTE_DECL) {
|
||||
node_list_unlink(attr->children TSRMLS_CC);
|
||||
}
|
||||
xmlSetProp(elemp, (xmlChar *)localname, (xmlChar *)value);
|
||||
attr = xmlSetProp(elemp, (xmlChar *)localname, (xmlChar *)value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1895,17 +1895,9 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{
|
||||
RETVAL_FALSE;
|
||||
} else {
|
||||
if (mode == 0) {
|
||||
#ifdef LIBXML2_NEW_BUFFER
|
||||
ret = xmlOutputBufferGetSize(buf);
|
||||
#else
|
||||
ret = buf->buffer->use;
|
||||
#endif
|
||||
if (ret > 0) {
|
||||
#ifdef LIBXML2_NEW_BUFFER
|
||||
RETVAL_STRINGL((char *) xmlOutputBufferGetContent(buf), ret, 1);
|
||||
#else
|
||||
RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);
|
||||
#endif
|
||||
} else {
|
||||
RETVAL_EMPTY_STRING();
|
||||
}
|
||||
|
||||
@@ -729,7 +729,6 @@ PHP_FUNCTION(enchant_dict_quick_check)
|
||||
|
||||
if (sugg) {
|
||||
zval_dtor(sugg);
|
||||
array_init(sugg);
|
||||
}
|
||||
|
||||
PHP_ENCHANT_GET_DICT;
|
||||
@@ -743,6 +742,8 @@ PHP_FUNCTION(enchant_dict_quick_check)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
array_init(sugg);
|
||||
|
||||
suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg_st);
|
||||
memcpy(&n_sugg, &n_sugg_st, sizeof(n_sugg));
|
||||
if (suggs && n_sugg) {
|
||||
|
||||
@@ -12,7 +12,7 @@ var_dump(exif_read_data($infile));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOri): Illegal pointer offset(%s) in %s on line %d
|
||||
Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOri): Illegal pointer offset(x%x + x%x = x%x > x%x) in %s on line %d
|
||||
|
||||
Warning: exif_read_data(bug60150.jpg): Error reading from file: got=x%x(=%d) != itemlen-%d=x%x(=%d) in %s on line %d
|
||||
|
||||
|
||||
@@ -20,9 +20,8 @@
|
||||
|
||||
#include <php.h>
|
||||
|
||||
#include "../intl_common.h"
|
||||
#include "../intl_error.h"
|
||||
#include "../intl_data.h"
|
||||
#include "intl_common.h"
|
||||
#include "intl_error.h"
|
||||
|
||||
#include <unicode/ucol.h>
|
||||
|
||||
@@ -55,7 +54,9 @@ extern zend_class_entry *Collator_ce_ptr;
|
||||
Collator_object* co = NULL; \
|
||||
intl_error_reset( NULL TSRMLS_CC ); \
|
||||
|
||||
#define COLLATOR_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(Collator, co)
|
||||
#define COLLATOR_METHOD_FETCH_OBJECT \
|
||||
co = (Collator_object *) zend_object_store_get_object( object TSRMLS_CC ); \
|
||||
intl_error_reset( COLLATOR_ERROR_P( co ) TSRMLS_CC ); \
|
||||
|
||||
// Macro to check return value of a ucol_* function call.
|
||||
#define COLLATOR_CHECK_STATUS( co, msg ) \
|
||||
|
||||
@@ -45,7 +45,7 @@ static void collator_ctor(INTERNAL_FUNCTION_PARAMETERS)
|
||||
}
|
||||
|
||||
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
|
||||
COLLATOR_METHOD_FETCH_OBJECT;
|
||||
co = (Collator_object *) zend_object_store_get_object( object TSRMLS_CC );
|
||||
|
||||
if(locale_len == 0) {
|
||||
locale = INTL_G(default_locale);
|
||||
|
||||
@@ -108,7 +108,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
|
||||
goto error;
|
||||
}
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
||||
if (DATE_FORMAT_OBJECT(dfo) != NULL) {
|
||||
intl_errors_set(INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR,
|
||||
|
||||
@@ -17,9 +17,8 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "../php_intl.h"
|
||||
#include "dateformat_class.h"
|
||||
#include "../intl_convert.h"
|
||||
#include "php_intl.h"
|
||||
#include "intl_convert.h"
|
||||
#include "dateformat_class.h"
|
||||
#include "dateformat_attr.h"
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
#include "dateformat.h"
|
||||
#include "dateformat_attr.h"
|
||||
|
||||
#include <zend_exceptions.h>
|
||||
|
||||
zend_class_entry *IntlDateFormatter_ce_ptr = NULL;
|
||||
static zend_object_handlers IntlDateFormatter_handlers;
|
||||
|
||||
@@ -89,23 +87,18 @@ zend_object_value IntlDateFormatter_object_clone(zval *object TSRMLS_DC)
|
||||
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
|
||||
IntlDateFormatter_object *dfo, *new_dfo;
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
|
||||
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT;
|
||||
new_obj_val = IntlDateFormatter_ce_ptr->create_object(IntlDateFormatter_ce_ptr TSRMLS_CC);
|
||||
new_dfo = (IntlDateFormatter_object *)zend_object_store_get_object_by_handle(new_obj_val.handle TSRMLS_CC);
|
||||
/* clone standard parts */
|
||||
zend_objects_clone_members(&new_dfo->zo, new_obj_val, &dfo->zo, handle TSRMLS_CC);
|
||||
/* clone formatter object */
|
||||
if (dfo->datef_data.udatf != NULL) {
|
||||
DATE_FORMAT_OBJECT(new_dfo) = udat_clone(DATE_FORMAT_OBJECT(dfo), &INTL_DATA_ERROR_CODE(dfo));
|
||||
if (U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
|
||||
/* set up error in case error handler is interested */
|
||||
intl_errors_set(INTL_DATA_ERROR_P(dfo), INTL_DATA_ERROR_CODE(dfo),
|
||||
"Failed to clone IntlDateFormatter object", 0 TSRMLS_CC );
|
||||
zend_throw_exception(NULL, "Failed to clone IntlDateFormatter object", 0 TSRMLS_CC);
|
||||
}
|
||||
} else {
|
||||
zend_throw_exception(NULL, "Cannot clone unconstructed IntlDateFormatter", 0 TSRMLS_CC);
|
||||
DATE_FORMAT_OBJECT(new_dfo) = udat_clone(DATE_FORMAT_OBJECT(dfo), &INTL_DATA_ERROR_CODE(new_dfo));
|
||||
if(U_FAILURE(INTL_DATA_ERROR_CODE(new_dfo))) {
|
||||
/* set up error in case error handler is interested */
|
||||
intl_error_set( NULL, INTL_DATA_ERROR_CODE(new_dfo), "Failed to clone IntlDateFormatter object", 0 TSRMLS_CC );
|
||||
IntlDateFormatter_object_dtor(new_dfo, new_obj_val.handle TSRMLS_CC); /* free new object */
|
||||
zend_error(E_ERROR, "Failed to clone IntlDateFormatter object");
|
||||
}
|
||||
return new_obj_val;
|
||||
}
|
||||
|
||||
@@ -38,15 +38,7 @@ extern zend_class_entry *IntlDateFormatter_ce_ptr;
|
||||
/* Auxiliary macros */
|
||||
|
||||
#define DATE_FORMAT_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(IntlDateFormatter, dfo)
|
||||
#define DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(IntlDateFormatter, dfo)
|
||||
#define DATE_FORMAT_METHOD_FETCH_OBJECT \
|
||||
DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK; \
|
||||
if (dfo->datef_data.udatf == NULL) \
|
||||
{ \
|
||||
intl_errors_set(&dfo->datef_data.error, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed IntlDateFormatter", 0 TSRMLS_CC); \
|
||||
RETURN_FALSE; \
|
||||
}
|
||||
|
||||
#define DATE_FORMAT_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(IntlDateFormatter, dfo)
|
||||
#define DATE_FORMAT_OBJECT(dfo) (dfo)->datef_data.udatf
|
||||
|
||||
#endif // #ifndef DATE_FORMAT_CLASS_H
|
||||
@@ -24,8 +24,6 @@
|
||||
#include "formatter_main.h"
|
||||
#include "formatter_attr.h"
|
||||
|
||||
#include <zend_exceptions.h>
|
||||
|
||||
zend_class_entry *NumberFormatter_ce_ptr = NULL;
|
||||
static zend_object_handlers NumberFormatter_handlers;
|
||||
|
||||
@@ -84,23 +82,18 @@ zend_object_value NumberFormatter_object_clone(zval *object TSRMLS_DC)
|
||||
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
|
||||
NumberFormatter_object *nfo, *new_nfo;
|
||||
|
||||
FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK;
|
||||
FORMATTER_METHOD_FETCH_OBJECT;
|
||||
new_obj_val = NumberFormatter_ce_ptr->create_object(NumberFormatter_ce_ptr TSRMLS_CC);
|
||||
new_nfo = (NumberFormatter_object *)zend_object_store_get_object_by_handle(new_obj_val.handle TSRMLS_CC);
|
||||
/* clone standard parts */
|
||||
zend_objects_clone_members(&new_nfo->zo, new_obj_val, &nfo->zo, handle TSRMLS_CC);
|
||||
/* clone formatter object. It may fail, the destruction code must handle this case */
|
||||
if (FORMATTER_OBJECT(nfo) != NULL) {
|
||||
FORMATTER_OBJECT(new_nfo) = unum_clone(FORMATTER_OBJECT(nfo),
|
||||
&INTL_DATA_ERROR_CODE(nfo));
|
||||
if (U_FAILURE(INTL_DATA_ERROR_CODE(nfo))) {
|
||||
/* set up error in case error handler is interested */
|
||||
intl_errors_set(INTL_DATA_ERROR_P(nfo), INTL_DATA_ERROR_CODE(nfo),
|
||||
"Failed to clone NumberFormatter object", 0 TSRMLS_CC);
|
||||
zend_throw_exception(NULL, "Failed to clone NumberFormatter object", 0 TSRMLS_CC);
|
||||
}
|
||||
} else {
|
||||
zend_throw_exception(NULL, "Cannot clone unconstructed NumberFormatter", 0 TSRMLS_CC);
|
||||
/* clone formatter object */
|
||||
FORMATTER_OBJECT(new_nfo) = unum_clone(FORMATTER_OBJECT(nfo), &INTL_DATA_ERROR_CODE(new_nfo));
|
||||
if(U_FAILURE(INTL_DATA_ERROR_CODE(new_nfo))) {
|
||||
/* set up error in case error handler is interested */
|
||||
intl_error_set( NULL, INTL_DATA_ERROR_CODE(new_nfo), "Failed to clone NumberFormatter object", 0 TSRMLS_CC );
|
||||
NumberFormatter_object_dtor(new_nfo, new_obj_val.handle TSRMLS_CC); /* free new object */
|
||||
zend_error(E_ERROR, "Failed to clone NumberFormatter object");
|
||||
}
|
||||
return new_obj_val;
|
||||
}
|
||||
|
||||
@@ -34,17 +34,8 @@ extern zend_class_entry *NumberFormatter_ce_ptr;
|
||||
|
||||
/* Auxiliary macros */
|
||||
|
||||
#define FORMATTER_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(NumberFormatter, nfo)
|
||||
#define FORMATTER_OBJECT(nfo) (nfo)->nf_data.unum
|
||||
#define FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(NumberFormatter, nfo)
|
||||
#define FORMATTER_METHOD_FETCH_OBJECT \
|
||||
FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK; \
|
||||
if (FORMATTER_OBJECT(nfo) == NULL) \
|
||||
{ \
|
||||
intl_errors_set(&nfo->nf_data.error, U_ILLEGAL_ARGUMENT_ERROR, \
|
||||
"Found unconstructed NumberFormatter", 0 TSRMLS_CC); \
|
||||
RETURN_FALSE; \
|
||||
}
|
||||
|
||||
#define FORMATTER_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(NumberFormatter, nfo)
|
||||
#define FORMATTER_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(NumberFormatter, nfo)
|
||||
#define FORMATTER_OBJECT(nfo) (nfo)->nf_data.unum
|
||||
|
||||
#endif // #ifndef FORMATTER_CLASS_H
|
||||
@@ -47,7 +47,7 @@ static void numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
|
||||
|
||||
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
|
||||
object = return_value;
|
||||
FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK;
|
||||
FORMATTER_METHOD_FETCH_OBJECT;
|
||||
|
||||
/* Convert pattern (if specified) to UTF-16. */
|
||||
if(pattern && pattern_len) {
|
||||
|
||||
@@ -49,7 +49,7 @@ static void msgfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
|
||||
}
|
||||
|
||||
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
|
||||
MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
|
||||
MSG_FORMAT_METHOD_FETCH_OBJECT;
|
||||
|
||||
/* Convert pattern (if specified) to UTF-16. */
|
||||
if(pattern && pattern_len) {
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
#include "msgformat.h"
|
||||
#include "msgformat_attr.h"
|
||||
|
||||
#include <zend_exceptions.h>
|
||||
|
||||
zend_class_entry *MessageFormatter_ce_ptr = NULL;
|
||||
static zend_object_handlers MessageFormatter_handlers;
|
||||
|
||||
@@ -82,24 +80,18 @@ zend_object_value MessageFormatter_object_clone(zval *object TSRMLS_DC)
|
||||
zend_object_handle handle = Z_OBJ_HANDLE_P(object);
|
||||
MessageFormatter_object *mfo, *new_mfo;
|
||||
|
||||
MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
|
||||
MSG_FORMAT_METHOD_FETCH_OBJECT;
|
||||
new_obj_val = MessageFormatter_ce_ptr->create_object(MessageFormatter_ce_ptr TSRMLS_CC);
|
||||
new_mfo = (MessageFormatter_object *)zend_object_store_get_object_by_handle(new_obj_val.handle TSRMLS_CC);
|
||||
/* clone standard parts */
|
||||
zend_objects_clone_members(&new_mfo->zo, new_obj_val, &mfo->zo, handle TSRMLS_CC);
|
||||
|
||||
/* clone formatter object */
|
||||
if (MSG_FORMAT_OBJECT(mfo) != NULL) {
|
||||
MSG_FORMAT_OBJECT(new_mfo) = umsg_clone(MSG_FORMAT_OBJECT(mfo),
|
||||
&INTL_DATA_ERROR_CODE(mfo));
|
||||
|
||||
if (U_FAILURE(INTL_DATA_ERROR_CODE(mfo))) {
|
||||
intl_errors_set(INTL_DATA_ERROR_P(mfo), INTL_DATA_ERROR_CODE(mfo),
|
||||
"Failed to clone MessageFormatter object", 0 TSRMLS_CC);
|
||||
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Failed to clone MessageFormatter object");
|
||||
}
|
||||
} else {
|
||||
zend_throw_exception_ex(NULL, 0 TSRMLS_CC, "Cannot clone unconstructed MessageFormatter");
|
||||
MSG_FORMAT_OBJECT(new_mfo) = umsg_clone(MSG_FORMAT_OBJECT(mfo), &INTL_DATA_ERROR_CODE(new_mfo));
|
||||
if(U_FAILURE(INTL_DATA_ERROR_CODE(new_mfo))) {
|
||||
/* set up error in case error handler is interested */
|
||||
intl_error_set( NULL, INTL_DATA_ERROR_CODE(new_mfo), "Failed to clone MessageFormatter object", 0 TSRMLS_CC );
|
||||
MessageFormatter_object_dtor(new_mfo, new_obj_val.handle TSRMLS_CC); /* free new object */
|
||||
zend_error(E_ERROR, "Failed to clone MessageFormatter object");
|
||||
}
|
||||
return new_obj_val;
|
||||
}
|
||||
|
||||
@@ -37,15 +37,7 @@ extern zend_class_entry *MessageFormatter_ce_ptr;
|
||||
/* Auxiliary macros */
|
||||
|
||||
#define MSG_FORMAT_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(MessageFormatter, mfo)
|
||||
#define MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(MessageFormatter, mfo)
|
||||
#define MSG_FORMAT_METHOD_FETCH_OBJECT \
|
||||
MSG_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK; \
|
||||
if (MSG_FORMAT_OBJECT(mfo) == NULL) { \
|
||||
intl_errors_set(&mfo->mf_data.error, U_ILLEGAL_ARGUMENT_ERROR, \
|
||||
"Found unconstructed MessageFormatter", 0 TSRMLS_CC); \
|
||||
RETURN_FALSE; \
|
||||
}
|
||||
|
||||
#define MSG_FORMAT_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(MessageFormatter, mfo)
|
||||
#define MSG_FORMAT_OBJECT(mfo) (mfo)->mf_data.umsgf
|
||||
|
||||
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM < 48
|
||||
|
||||
@@ -252,14 +252,7 @@ PHP_FUNCTION( resourcebundle_get )
|
||||
/* {{{ resourcebundle_array_count */
|
||||
int resourcebundle_array_count(zval *object, long *count TSRMLS_DC)
|
||||
{
|
||||
ResourceBundle_object *rb;
|
||||
RESOURCEBUNDLE_METHOD_FETCH_OBJECT_NO_CHECK;
|
||||
|
||||
if (rb->me == NULL) {
|
||||
intl_errors_set(&rb->error, U_ILLEGAL_ARGUMENT_ERROR,
|
||||
"Found unconstructed ResourceBundle", 0 TSRMLS_CC);
|
||||
return 0;
|
||||
}
|
||||
ResourceBundle_object *rb = (ResourceBundle_object *) zend_object_store_get_object( object TSRMLS_CC);
|
||||
|
||||
*count = ures_getSize( rb->me );
|
||||
|
||||
|
||||
@@ -33,16 +33,7 @@ typedef struct {
|
||||
} ResourceBundle_object;
|
||||
|
||||
#define RESOURCEBUNDLE_METHOD_INIT_VARS INTL_METHOD_INIT_VARS(ResourceBundle, rb)
|
||||
#define RESOURCEBUNDLE_METHOD_FETCH_OBJECT_NO_CHECK INTL_METHOD_FETCH_OBJECT(ResourceBundle, rb)
|
||||
#define RESOURCEBUNDLE_METHOD_FETCH_OBJECT \
|
||||
INTL_METHOD_FETCH_OBJECT(ResourceBundle, rb); \
|
||||
if (RESOURCEBUNDLE_OBJECT(rb) == NULL) { \
|
||||
intl_errors_set(&rb->error, U_ILLEGAL_ARGUMENT_ERROR, \
|
||||
"Found unconstructed ResourceBundle", 0 TSRMLS_CC); \
|
||||
RETURN_FALSE; \
|
||||
}
|
||||
|
||||
|
||||
#define RESOURCEBUNDLE_METHOD_FETCH_OBJECT INTL_METHOD_FETCH_OBJECT(ResourceBundle, rb)
|
||||
#define RESOURCEBUNDLE_OBJECT(rb) (rb)->me
|
||||
|
||||
void resourcebundle_register_class( TSRMLS_D );
|
||||
|
||||
@@ -15,6 +15,7 @@ $value = $formatter->parse('2147483650', \NumberFormatter::TYPE_INT64);
|
||||
var_dump($value);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTREGEX--
|
||||
int(2147483647)
|
||||
int(2147483650)
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Cloning unconstructed IntlDateFormatter
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A extends IntlDateFormatter {
|
||||
function __construct() {}
|
||||
}
|
||||
|
||||
$a = new A;
|
||||
try {
|
||||
$b = clone $a;
|
||||
} catch (Exception $e) {
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
--EXPECTF--
|
||||
string(%s) "Cannot clone unconstructed IntlDateFormatter"
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Cloning unconstructed numfmt
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A extends NumberFormatter {
|
||||
function __construct() {}
|
||||
}
|
||||
|
||||
$a = new A;
|
||||
try {
|
||||
$b = clone $a;
|
||||
} catch (Exception $e) {
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
--EXPECTF--
|
||||
string(42) "Cannot clone unconstructed NumberFormatter"
|
||||
@@ -1,20 +0,0 @@
|
||||
--TEST--
|
||||
Cloning unconstructed MessageFormatter
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class A extends MessageFormatter {
|
||||
function __construct() {}
|
||||
}
|
||||
|
||||
$a = new A;
|
||||
try {
|
||||
$b = clone $a;
|
||||
} catch (Exception $e) {
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
--EXPECTF--
|
||||
string(%d) "Cannot clone unconstructed MessageFormatter"
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeDoubleIntl #1
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeDoubleIntl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:1:"1";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeDoubleIntl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_DOUBLE);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
string(1) "1"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeDoubleIntl #2
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeDoubleIntl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:3:"1.1";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeDoubleIntl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_DOUBLE);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(1.1)
|
||||
[2]=>
|
||||
string(3) "1.1"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeDoubleIntl #3
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeDoubleIntl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:7:"SFD1.00";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeDoubleIntl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_DOUBLE);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
string(7) "SFD1.00"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeDoubleIntl #4
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeDoubleIntl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:7:"SFD1.10";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeDoubleIntl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_DOUBLE);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(1.1)
|
||||
[2]=>
|
||||
string(7) "SFD1.10"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,49 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #1
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
// port of Symfony's Symfony\Component\Locale\Tests\Stub\StubNumberFormatterTest#testFormatTypeInt32Intl
|
||||
|
||||
|
||||
// Crashes on Windows
|
||||
// Windows note: the popup '...program has stopped working'(AEDebug Popup)
|
||||
// doesn't always show if you're rapidly running this test repeatedly.
|
||||
// regardless of that, the test always crashes every time.
|
||||
// (it will show up the first time, or if you wait a while before running it again.)
|
||||
// (the popup may also be disabled, which can be done with a registry setting.)
|
||||
// you can confirm it crashed by checking the exit code OR
|
||||
// the message this test prints at the very end (expected output for pass).
|
||||
//
|
||||
// Get Exit Code
|
||||
// Linux: echo $?
|
||||
// Windows: echo %ErrorLevel%
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:1:"1";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt32Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
string(1) "1"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,33 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #2
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
// StubNumberFormatterTest#testFormatTypeInt32Intl is tested many times, each with different args.
|
||||
// there are 7 sets of args that crash PHP (and other args that don't), each of those 7 is now a separate PHPT test
|
||||
// to ensure that each of the 7 args are always tested.
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:1:"1";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt32Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(1.1)
|
||||
[2]=>
|
||||
string(1) "1"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,32 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #3
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
|
||||
$unit_test_args = unserialize('a:4:{i:0;O:15:"NumberFormatter":0:{}i:1;d:2147483648;i:2;s:14:"-2,147,483,648";i:3;s:83:"->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt32Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(4) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(2147483648)
|
||||
[2]=>
|
||||
string(14) "-2,147,483,648"
|
||||
[3]=>
|
||||
string(83) "->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range."
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #4
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:7:"SFD1.00";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt32Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
string(7) "SFD1.00"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #5
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:7:"SFD1.00";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt32Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(1.1)
|
||||
[2]=>
|
||||
string(7) "SFD1.00"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,32 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #6
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
|
||||
$unit_test_args = unserialize('a:4:{i:0;O:15:"NumberFormatter":0:{}i:1;d:2147483648;i:2;s:21:"(SFD2,147,483,648.00)";i:3;s:83:"->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt32Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(4) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(2147483648)
|
||||
[2]=>
|
||||
string(21) "(SFD2,147,483,648.00)"
|
||||
[3]=>
|
||||
string(83) "->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range."
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,32 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt32Intl #7
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt32Intl
|
||||
$unit_test_args = unserialize('a:4:{i:0;O:15:"NumberFormatter":0:{}i:1;d:-2147483649;i:2;s:19:"SFD2,147,483,647.00";i:3;s:83:"->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range.";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt32Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT32);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(4) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(-2147483649)
|
||||
[2]=>
|
||||
string(19) "SFD2,147,483,647.00"
|
||||
[3]=>
|
||||
string(83) "->format() TYPE_INT32 formats inconsistently an integer if out of the 32 bit range."
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #1
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:1:"1";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt64Intl
|
||||
//$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
string(1) "1"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #2
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:1:"1";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt64Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(1.1)
|
||||
[2]=>
|
||||
string(1) "1"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #3
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:2147483648;i:2;s:13:"2,147,483,648";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt64Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(2147483648)
|
||||
[2]=>
|
||||
string(13) "2,147,483,648"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #4
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:-2147483649;i:2;s:14:"-2,147,483,649";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt64Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(-2147483649)
|
||||
[2]=>
|
||||
string(14) "-2,147,483,649"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #5
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;i:1;i:2;s:7:"SFD1.00";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt64Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
string(7) "SFD1.00"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #6
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:1.1000000000000001;i:2;s:7:"SFD1.00";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt64Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(1.1)
|
||||
[2]=>
|
||||
string(7) "SFD1.00"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #7
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:2147483648;i:2;s:19:"SFD2,147,483,648.00";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt64Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(2147483648)
|
||||
[2]=>
|
||||
string(19) "SFD2,147,483,648.00"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,30 +0,0 @@
|
||||
--TEST--
|
||||
Symfony StubNumberFormatterTest#testFormatTypeInt64Intl #8
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
// PHP Unit's code to unserialize data passed as args to #testFormatTypeInt64Intl
|
||||
$unit_test_args = unserialize('a:3:{i:0;O:15:"NumberFormatter":0:{}i:1;d:-2147483649;i:2;s:21:"(SFD2,147,483,649.00)";}');
|
||||
|
||||
var_dump($unit_test_args);
|
||||
|
||||
// execute the code from #testFormatTypeInt64Intl
|
||||
$unit_test_args[0]->format($unit_test_args[1], \NumberFormatter::TYPE_INT64);
|
||||
|
||||
echo "== didn't crash ==".PHP_EOL;
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
object(NumberFormatter)#1 (0) {
|
||||
}
|
||||
[1]=>
|
||||
float(-2147483649)
|
||||
[2]=>
|
||||
string(21) "(SFD2,147,483,649.00)"
|
||||
}
|
||||
== didn't crash ==
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
mcrypt_cfb
|
||||
mcrypt_cbf
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
|
||||
--FILE--
|
||||
@@ -8,7 +8,7 @@ $key = "FooBar";
|
||||
$secret = "PHP Testfest 2008";
|
||||
$cipher = MCRYPT_RIJNDAEL_128;
|
||||
|
||||
$iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher, MCRYPT_MODE_CFB), MCRYPT_RAND);
|
||||
$iv = mcrypt_create_iv(mcrypt_get_iv_size($cipher, MCRYPT_MODE_ECB), MCRYPT_RAND);
|
||||
$enc_data = mcrypt_cfb($cipher, $key, $secret, MCRYPT_ENCRYPT, $iv);
|
||||
|
||||
// we have to trim as AES rounds the blocks and decrypt doesnt detect that
|
||||
@@ -20,4 +20,4 @@ mcrypt_cfb($cipher, $key, $enc_data, MCRYPT_DECRYPT);
|
||||
--EXPECTF--
|
||||
PHP Testfest 2008
|
||||
|
||||
Warning: mcrypt_cfb(): Attempt to use an empty IV, which is NOT recommend in %s on line %d
|
||||
Warning: mcrypt_cfb(): Attempt to use an empty IV, which is NOT recommend in %s on line %d
|
||||
@@ -5,13 +5,13 @@ mcrypt_create_iv
|
||||
--FILE--
|
||||
<?php
|
||||
$iv1 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND);
|
||||
$iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);
|
||||
$iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM);
|
||||
$iv2 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_192, MCRYPT_MODE_ECB), MCRYPT_DEV_URANDOM);
|
||||
$iv3 = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_DEV_RANDOM);
|
||||
|
||||
echo strlen($iv1) . "\n";
|
||||
echo strlen($iv2) . "\n";
|
||||
echo strlen($iv3) . "\n";
|
||||
--EXPECT--
|
||||
16
|
||||
16
|
||||
16
|
||||
24
|
||||
32
|
||||
@@ -2,12 +2,13 @@
|
||||
LOAD DATA INFILE - open_basedir
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include_once('skipif.inc');
|
||||
@include_once("connect.inc");
|
||||
|
||||
if (!isset($db)) {
|
||||
die("skip open_basedir setting prevents inclusing of required files");
|
||||
}
|
||||
|
||||
include_once('skipif.inc');
|
||||
include_once('skipifconnectfailure.inc');
|
||||
|
||||
|
||||
|
||||
@@ -705,11 +705,6 @@ PHP_FUNCTION(mysqli_poll)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (!r_array && !e_array) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "No stream arrays were passed");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
if (r_array != NULL) {
|
||||
mysqlnd_zval_array_to_mysqlnd_array(r_array, &new_r_array TSRMLS_CC);
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
--TEST--
|
||||
Bug #62885 (mysqli_poll - Segmentation fault)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once('skipif.inc');
|
||||
require_once("connect.inc");
|
||||
if (!$IS_MYSQLND) {
|
||||
die("skip mysqlnd only test");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
$tablica = array();
|
||||
$test1 = mysqli_poll($test2, $test3, $tablica, null);
|
||||
|
||||
$test2 = array();
|
||||
$test2 = array();
|
||||
$test1 = mysqli_poll($test2, $test3, $tablica, null);
|
||||
echo "okey";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: mysqli_poll(): No stream arrays were passed in %sbug62885.php on line %d
|
||||
|
||||
Warning: mysqli_poll(): No stream arrays were passed in %sbug62885.php on line %d
|
||||
okey
|
||||
@@ -5,7 +5,7 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates
|
||||
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
|
||||
require(dirname(__FILE__)."/connect.inc");
|
||||
// The bind buffer size edge cases seem to change each DB version.
|
||||
if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) {
|
||||
if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
|
||||
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
|
||||
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter
|
||||
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
|
||||
require(dirname(__FILE__)."/connect.inc");
|
||||
// The bind buffer size edge cases seem to change each DB version.
|
||||
if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) {
|
||||
if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
|
||||
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
|
||||
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter
|
||||
if (!extension_loaded('oci8')) die ("skip no oci8 extension");
|
||||
require(dirname(__FILE__)."/connect.inc");
|
||||
// The bind buffer size edge cases seem to change each DB version.
|
||||
if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) {
|
||||
if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) {
|
||||
if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) {
|
||||
die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases");
|
||||
}
|
||||
|
||||
+25
-28
@@ -45,34 +45,31 @@ if (file_exists(dirname(__FILE__)."/details_local.inc")) {
|
||||
* Used for creating/dropping schema objects used by a test
|
||||
*/
|
||||
|
||||
if (!function_exists('oci8_test_sql_execute')) {
|
||||
function oci8_test_sql_execute($c, $stmtarray)
|
||||
{
|
||||
foreach ($stmtarray as $stmt) {
|
||||
$s = oci_parse($c, $stmt);
|
||||
if (!$s) {
|
||||
$m = oci_error($c);
|
||||
echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
|
||||
}
|
||||
else {
|
||||
$r = @oci_execute($s);
|
||||
if (!$r) {
|
||||
$m = oci_error($s);
|
||||
if (!in_array($m['code'], array( // ignore expected errors
|
||||
942 // table or view does not exist
|
||||
, 1918 // user does not exist
|
||||
, 2024 // database link not found
|
||||
, 2289 // sequence does not exist
|
||||
, 4080 // trigger does not exist
|
||||
, 38802 // edition does not exist
|
||||
))) {
|
||||
echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function oci8_test_sql_execute($c, $stmtarray)
|
||||
{
|
||||
foreach ($stmtarray as $stmt) {
|
||||
$s = oci_parse($c, $stmt);
|
||||
if (!$s) {
|
||||
$m = oci_error($c);
|
||||
echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
|
||||
}
|
||||
else {
|
||||
$r = @oci_execute($s);
|
||||
if (!$r) {
|
||||
$m = oci_error($s);
|
||||
if (!in_array($m['code'], array( // ignore expected errors
|
||||
942 // table or view does not exist
|
||||
, 1918 // user does not exist
|
||||
, 2024 // database link not found
|
||||
, 2289 // sequence does not exist
|
||||
, 4080 // trigger does not exist
|
||||
, 38802 // edition does not exist
|
||||
))) {
|
||||
echo $stmt . PHP_EOL . $m['message'] . PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -6,9 +6,6 @@ $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on t
|
||||
require(dirname(__FILE__).'/skipif.inc');
|
||||
if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only");
|
||||
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
|
||||
if (getenv("USE_ZEND_ALLOC") === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
}
|
||||
?>
|
||||
--INI--
|
||||
memory_limit=3M
|
||||
|
||||
@@ -5,7 +5,6 @@ Basic XMLType test
|
||||
if (!extension_loaded("simplexml")) die("skip no simplexml extension");
|
||||
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
|
||||
require(dirname(__FILE__).'/skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
+1
-1
@@ -694,7 +694,7 @@ static PHP_METHOD(PDO, inTransaction)
|
||||
}
|
||||
PDO_CONSTRUCT_CHECK;
|
||||
|
||||
RETURN_BOOL(dbh->in_txn);
|
||||
RETURN_LONG(dbh->in_txn);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ if (false == $dir) die('skip no driver');
|
||||
if (!strncasecmp(getenv('PDOTEST_DSN'), 'sqlite', strlen('sqlite'))) die('skip not relevant for sqlite driver');
|
||||
if (!strncasecmp(getenv('PDOTEST_DSN'), 'pgsql', strlen('pgsql'))) die('skip not relevant for pgsql driver');
|
||||
if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - Hyphen is not legal for bind names in Oracle DB');
|
||||
if (!strncasecmp(getenv('PDOTEST_DSN'), 'firebird', strlen('firebird'))) die('skip not relevant for firebird driver');
|
||||
require_once $dir . 'pdo_test.inc';
|
||||
PDOTest::skip();
|
||||
?>
|
||||
|
||||
+4
-1
@@ -2653,8 +2653,11 @@ int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert,
|
||||
len = -len;
|
||||
}
|
||||
user_stub = 0;
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (!(len = php_stream_copy_to_mem(stubfile, (void **) &user_stub, len, 0)) || !user_stub) {
|
||||
#else
|
||||
if (!(len = php_stream_copy_to_mem(stubfile, &user_stub, len, 0)) || !user_stub) {
|
||||
#endif
|
||||
if (closeoldfile) {
|
||||
php_stream_close(oldfile);
|
||||
}
|
||||
|
||||
+131
-6
@@ -58,6 +58,9 @@ static int phar_file_type(HashTable *mimes, char *file, char **mime_type TSRMLS_
|
||||
|
||||
static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char *basename, int request_uri_len TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
int is_unicode = 0;
|
||||
#endif
|
||||
HashTable *_SERVER;
|
||||
zval **stuff;
|
||||
char *path_info;
|
||||
@@ -73,7 +76,18 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char
|
||||
_SERVER = Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_SERVER]);
|
||||
|
||||
/* PATH_INFO and PATH_TRANSLATED should always be munged */
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (phar_find_key(_SERVER, "PATH_INFO", sizeof("PATH_INFO"), (void **) &stuff TSRMLS_CC)) {
|
||||
if (Z_TYPE_PP(stuff) == IS_UNICODE) {
|
||||
is_unicode = 1;
|
||||
zval_unicode_to_string(*stuff TSRMLS_CC);
|
||||
} else {
|
||||
is_unicode = 0;
|
||||
}
|
||||
#else
|
||||
if (SUCCESS == zend_hash_find(_SERVER, "PATH_INFO", sizeof("PATH_INFO"), (void **) &stuff)) {
|
||||
#endif
|
||||
|
||||
path_info = Z_STRVAL_PP(stuff);
|
||||
code = Z_STRLEN_PP(stuff);
|
||||
|
||||
@@ -82,19 +96,38 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char
|
||||
|
||||
MAKE_STD_ZVAL(temp);
|
||||
ZVAL_STRINGL(temp, path_info, code, 0);
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (is_unicode) {
|
||||
zval_string_to_unicode(*stuff TSRMLS_CC);
|
||||
}
|
||||
#endif
|
||||
zend_hash_update(_SERVER, "PHAR_PATH_INFO", sizeof("PHAR_PATH_INFO"), &temp, sizeof(zval **), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (phar_find_key(_SERVER, "PATH_TRANSLATED", sizeof("PATH_TRANSLATED"), (void **) &stuff TSRMLS_CC)) {
|
||||
if (Z_TYPE_PP(stuff) == IS_UNICODE) {
|
||||
is_unicode = 1;
|
||||
zval_unicode_to_string(*stuff TSRMLS_CC);
|
||||
} else {
|
||||
is_unicode = 0;
|
||||
}
|
||||
#else
|
||||
if (SUCCESS == zend_hash_find(_SERVER, "PATH_TRANSLATED", sizeof("PATH_TRANSLATED"), (void **) &stuff)) {
|
||||
#endif
|
||||
|
||||
path_info = Z_STRVAL_PP(stuff);
|
||||
code = Z_STRLEN_PP(stuff);
|
||||
Z_STRLEN_PP(stuff) = spprintf(&(Z_STRVAL_PP(stuff)), 4096, "phar://%s%s", fname, entry);
|
||||
|
||||
MAKE_STD_ZVAL(temp);
|
||||
ZVAL_STRINGL(temp, path_info, code, 0);
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (is_unicode) {
|
||||
zval_string_to_unicode(*stuff TSRMLS_CC);
|
||||
}
|
||||
#endif
|
||||
zend_hash_update(_SERVER, "PHAR_PATH_TRANSLATED", sizeof("PHAR_PATH_TRANSLATED"), (void *) &temp, sizeof(zval **), NULL);
|
||||
}
|
||||
|
||||
@@ -103,7 +136,18 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char
|
||||
}
|
||||
|
||||
if (PHAR_GLOBALS->phar_SERVER_mung_list & PHAR_MUNG_REQUEST_URI) {
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (phar_find_key(_SERVER, "REQUEST_URI", sizeof("REQUEST_URI"), (void **) &stuff TSRMLS_CC)) {
|
||||
if (Z_TYPE_PP(stuff) == IS_UNICODE) {
|
||||
is_unicode = 1;
|
||||
zval_unicode_to_string(*stuff TSRMLS_CC);
|
||||
} else {
|
||||
is_unicode = 0;
|
||||
}
|
||||
#else
|
||||
if (SUCCESS == zend_hash_find(_SERVER, "REQUEST_URI", sizeof("REQUEST_URI"), (void **) &stuff)) {
|
||||
#endif
|
||||
|
||||
path_info = Z_STRVAL_PP(stuff);
|
||||
code = Z_STRLEN_PP(stuff);
|
||||
|
||||
@@ -112,14 +156,29 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char
|
||||
|
||||
MAKE_STD_ZVAL(temp);
|
||||
ZVAL_STRINGL(temp, path_info, code, 0);
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (is_unicode) {
|
||||
zval_string_to_unicode(*stuff TSRMLS_CC);
|
||||
}
|
||||
#endif
|
||||
zend_hash_update(_SERVER, "PHAR_REQUEST_URI", sizeof("PHAR_REQUEST_URI"), (void *) &temp, sizeof(zval **), NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (PHAR_GLOBALS->phar_SERVER_mung_list & PHAR_MUNG_PHP_SELF) {
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (phar_find_key(_SERVER, "PHP_SELF", sizeof("PHP_SELF"), (void **) &stuff TSRMLS_CC)) {
|
||||
if (Z_TYPE_PP(stuff) == IS_UNICODE) {
|
||||
is_unicode = 1;
|
||||
zval_unicode_to_string(*stuff TSRMLS_CC);
|
||||
} else {
|
||||
is_unicode = 0;
|
||||
}
|
||||
#else
|
||||
if (SUCCESS == zend_hash_find(_SERVER, "PHP_SELF", sizeof("PHP_SELF"), (void **) &stuff)) {
|
||||
#endif
|
||||
|
||||
path_info = Z_STRVAL_PP(stuff);
|
||||
code = Z_STRLEN_PP(stuff);
|
||||
|
||||
@@ -128,34 +187,68 @@ static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char
|
||||
|
||||
MAKE_STD_ZVAL(temp);
|
||||
ZVAL_STRINGL(temp, path_info, code, 0);
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (is_unicode) {
|
||||
zval_string_to_unicode(*stuff TSRMLS_CC);
|
||||
}
|
||||
#endif
|
||||
zend_hash_update(_SERVER, "PHAR_PHP_SELF", sizeof("PHAR_PHP_SELF"), (void *) &temp, sizeof(zval **), NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (PHAR_GLOBALS->phar_SERVER_mung_list & PHAR_MUNG_SCRIPT_NAME) {
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (phar_find_key(_SERVER, "SCRIPT_NAME", sizeof("SCRIPT_NAME"), (void **) &stuff TSRMLS_CC)) {
|
||||
if (Z_TYPE_PP(stuff) == IS_UNICODE) {
|
||||
is_unicode = 1;
|
||||
zval_unicode_to_string(*stuff TSRMLS_CC);
|
||||
} else {
|
||||
is_unicode = 0;
|
||||
}
|
||||
#else
|
||||
if (SUCCESS == zend_hash_find(_SERVER, "SCRIPT_NAME", sizeof("SCRIPT_NAME"), (void **) &stuff)) {
|
||||
#endif
|
||||
|
||||
path_info = Z_STRVAL_PP(stuff);
|
||||
code = Z_STRLEN_PP(stuff);
|
||||
ZVAL_STRINGL(*stuff, entry, entry_len, 1);
|
||||
|
||||
MAKE_STD_ZVAL(temp);
|
||||
ZVAL_STRINGL(temp, path_info, code, 0);
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (is_unicode) {
|
||||
zval_string_to_unicode(*stuff TSRMLS_CC);
|
||||
}
|
||||
#endif
|
||||
zend_hash_update(_SERVER, "PHAR_SCRIPT_NAME", sizeof("PHAR_SCRIPT_NAME"), (void *) &temp, sizeof(zval **), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (PHAR_GLOBALS->phar_SERVER_mung_list & PHAR_MUNG_SCRIPT_FILENAME) {
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (phar_find_key(_SERVER, "SCRIPT_FILENAME", sizeof("SCRIPT_FILENAME"), (void **) &stuff TSRMLS_CC)) {
|
||||
if (Z_TYPE_PP(stuff) == IS_UNICODE) {
|
||||
is_unicode = 1;
|
||||
zval_unicode_to_string(*stuff TSRMLS_CC);
|
||||
} else {
|
||||
is_unicode = 0;
|
||||
}
|
||||
#else
|
||||
if (SUCCESS == zend_hash_find(_SERVER, "SCRIPT_FILENAME", sizeof("SCRIPT_FILENAME"), (void **) &stuff)) {
|
||||
#endif
|
||||
|
||||
path_info = Z_STRVAL_PP(stuff);
|
||||
code = Z_STRLEN_PP(stuff);
|
||||
Z_STRLEN_PP(stuff) = spprintf(&(Z_STRVAL_PP(stuff)), 4096, "phar://%s%s", fname, entry);
|
||||
|
||||
MAKE_STD_ZVAL(temp);
|
||||
ZVAL_STRINGL(temp, path_info, code, 0);
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (is_unicode) {
|
||||
zval_string_to_unicode(*stuff TSRMLS_CC);
|
||||
}
|
||||
#endif
|
||||
zend_hash_update(_SERVER, "PHAR_SCRIPT_FILENAME", sizeof("PHAR_SCRIPT_FILENAME"), (void *) &temp, sizeof(zval **), NULL);
|
||||
}
|
||||
}
|
||||
@@ -847,7 +940,11 @@ PHP_METHOD(Phar, webPhar)
|
||||
if (ext) {
|
||||
++ext;
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (phar_find_key(Z_ARRVAL_P(mimeoverride), ext, strlen(ext)+1, (void **) &val TSRMLS_CC)) {
|
||||
#else
|
||||
if (SUCCESS == zend_hash_find(Z_ARRVAL_P(mimeoverride), ext, strlen(ext)+1, (void **) &val)) {
|
||||
#endif
|
||||
switch (Z_TYPE_PP(val)) {
|
||||
case IS_LONG:
|
||||
if (Z_LVAL_PP(val) == PHAR_MIME_PHP || Z_LVAL_PP(val) == PHAR_MIME_PHPS) {
|
||||
@@ -861,6 +958,11 @@ PHP_METHOD(Phar, webPhar)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
break;
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
case IS_UNICODE:
|
||||
zval_unicode_to_string(*(val) TSRMLS_CC);
|
||||
/* break intentionally omitted */
|
||||
#endif
|
||||
case IS_STRING:
|
||||
mime_type = Z_STRVAL_PP(val);
|
||||
code = PHAR_MIME_OTHER;
|
||||
@@ -911,12 +1013,26 @@ PHP_METHOD(Phar, mungServer)
|
||||
|
||||
for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(mungvalues)); SUCCESS == zend_hash_has_more_elements(Z_ARRVAL_P(mungvalues)); zend_hash_move_forward(Z_ARRVAL_P(mungvalues))) {
|
||||
zval **data = NULL;
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
zval *unicopy = NULL;
|
||||
#endif
|
||||
|
||||
if (SUCCESS != zend_hash_get_current_data(Z_ARRVAL_P(mungvalues), (void **) &data)) {
|
||||
zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, "unable to retrieve array value in Phar::mungServer()");
|
||||
return;
|
||||
}
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (Z_TYPE_PP(data) == IS_UNICODE) {
|
||||
MAKE_STD_ZVAL(unicopy);
|
||||
*unicopy = **data;
|
||||
zval_copy_ctor(unicopy);
|
||||
INIT_PZVAL(unicopy);
|
||||
zval_unicode_to_string(unicopy TSRMLS_CC);
|
||||
data = &unicopy;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Z_TYPE_PP(data) != IS_STRING) {
|
||||
zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, "Non-string value passed to Phar::mungServer(), expecting an array of any of these strings: PHP_SELF, REQUEST_URI, SCRIPT_FILENAME, SCRIPT_NAME");
|
||||
return;
|
||||
@@ -938,6 +1054,11 @@ PHP_METHOD(Phar, mungServer)
|
||||
if (Z_STRLEN_PP(data) == sizeof("SCRIPT_FILENAME")-1 && !strncmp(Z_STRVAL_PP(data), "SCRIPT_FILENAME", sizeof("SCRIPT_FILENAME")-1)) {
|
||||
PHAR_GLOBALS->phar_SERVER_mung_list |= PHAR_MUNG_SCRIPT_FILENAME;
|
||||
}
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (unicopy) {
|
||||
zval_ptr_dtor(&unicopy);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -4912,7 +5033,11 @@ PHP_METHOD(PharFileInfo, getContent)
|
||||
|
||||
phar_seek_efp(link, 0, SEEK_SET, 0, 0 TSRMLS_CC);
|
||||
Z_TYPE_P(return_value) = IS_STRING;
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
Z_STRLEN_P(return_value) = php_stream_copy_to_mem(fp, (void **) &(Z_STRVAL_P(return_value)), link->uncompressed_filesize, 0);
|
||||
#else
|
||||
Z_STRLEN_P(return_value) = php_stream_copy_to_mem(fp, &(Z_STRVAL_P(return_value)), link->uncompressed_filesize, 0);
|
||||
#endif
|
||||
|
||||
if (!Z_STRVAL_P(return_value)) {
|
||||
Z_STRVAL_P(return_value) = estrndup("", 0);
|
||||
|
||||
+12
-1
@@ -207,19 +207,30 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, char *pat
|
||||
fpf = php_stream_alloc(&phar_ops, idata, NULL, mode);
|
||||
php_url_free(resource);
|
||||
efree(internal_file);
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (context && context->options && phar_find_key(HASH_OF(context->options), "phar", sizeof("phar"), (void**)&pzoption TSRMLS_CC)) {
|
||||
#else
|
||||
if (context && context->options && zend_hash_find(HASH_OF(context->options), "phar", sizeof("phar"), (void**)&pzoption) == SUCCESS) {
|
||||
#endif
|
||||
pharcontext = HASH_OF(*pzoption);
|
||||
if (idata->internal_file->uncompressed_filesize == 0
|
||||
&& idata->internal_file->compressed_filesize == 0
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
&& phar_find_key(pharcontext, "compress", sizeof("compress"), (void**)&pzoption TSRMLS_CC)
|
||||
#else
|
||||
&& zend_hash_find(pharcontext, "compress", sizeof("compress"), (void**)&pzoption) == SUCCESS
|
||||
#endif
|
||||
&& Z_TYPE_PP(pzoption) == IS_LONG
|
||||
&& (Z_LVAL_PP(pzoption) & ~PHAR_ENT_COMPRESSION_MASK) == 0
|
||||
) {
|
||||
idata->internal_file->flags &= ~PHAR_ENT_COMPRESSION_MASK;
|
||||
idata->internal_file->flags |= Z_LVAL_PP(pzoption);
|
||||
}
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (phar_find_key(pharcontext, "metadata", sizeof("metadata"), (void**)&pzoption TSRMLS_CC)) {
|
||||
#else
|
||||
if (zend_hash_find(pharcontext, "metadata", sizeof("metadata"), (void**)&pzoption) == SUCCESS) {
|
||||
#endif
|
||||
if (idata->internal_file->metadata) {
|
||||
zval_ptr_dtor(&idata->internal_file->metadata);
|
||||
idata->internal_file->metadata = NULL;
|
||||
|
||||
+4
-1
@@ -986,8 +986,11 @@ int phar_tar_flush(phar_archive_data *phar, char *user_stub, long len, int defau
|
||||
len = -len;
|
||||
}
|
||||
user_stub = 0;
|
||||
|
||||
#if PHP_MAJOR_VERSION >= 6
|
||||
if (!(len = php_stream_copy_to_mem(stubfile, (void **) &user_stub, len, 0)) || !user_stub) {
|
||||
#else
|
||||
if (!(len = php_stream_copy_to_mem(stubfile, &user_stub, len, 0)) || !user_stub) {
|
||||
#endif
|
||||
if (error) {
|
||||
spprintf(error, 0, "unable to read resource to copy stub to new tar-based phar \"%s\"", phar->fname);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
Phar::mapPhar truncated manifest (not enough for manifest length)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip");?>
|
||||
--INI--
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$file = "<?php
|
||||
|
||||
@@ -4,7 +4,6 @@ Phar::mapPhar too many manifest entries
|
||||
<?php if (!extension_loaded("phar")) die("skip");?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$file = b"<?php
|
||||
|
||||
@@ -4,7 +4,6 @@ Phar::mapPhar buffer overrun
|
||||
<?php if (!extension_loaded("phar")) die("skip");?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$file = b"<?php
|
||||
|
||||
@@ -4,7 +4,6 @@ Phar::mapPhar filesize too small in manifest
|
||||
<?php if (!extension_loaded("phar")) die("skip");?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
||||
|
||||
@@ -4,7 +4,6 @@ Phar::mapPhar valid file
|
||||
<?php if (!extension_loaded("phar")) die("skip");?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of P
|
||||
?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
||||
@@ -34,4 +33,4 @@ while (false !== ($a = readdir($dir))) {
|
||||
string(1) "a"
|
||||
bool(false)
|
||||
string(1) "b"
|
||||
bool(true)
|
||||
bool(true)
|
||||
@@ -7,7 +7,6 @@ if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of P
|
||||
?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
||||
|
||||
@@ -7,7 +7,6 @@ if (version_compare(PHP_VERSION, "6.0", ">")) die("skip pre-unicode version of P
|
||||
?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
||||
|
||||
@@ -4,7 +4,6 @@ Phar: url stat
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
||||
@@ -134,4 +133,4 @@ array(26) {
|
||||
int(-1)
|
||||
[%sblocks"]=>
|
||||
int(-1)
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ Phar: stream stat
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
||||
@@ -83,4 +82,4 @@ array(26) {
|
||||
int(-1)
|
||||
[%sblocks"]=>
|
||||
int(-1)
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ Phar: stream stat
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
||||
|
||||
@@ -4,7 +4,6 @@ Phar::loadPhar
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--INI--
|
||||
phar.require_hash=0
|
||||
detect_unicode=0
|
||||
--FILE--
|
||||
<?php
|
||||
$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
|
||||
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 1 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite1.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -12,4 +11,4 @@ files/write.phar
|
||||
--EXPECT--
|
||||
hi
|
||||
changed
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 10 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite10.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -22,4 +21,4 @@ __HALT_COMPILER(); ?>
|
||||
"
|
||||
<?php __HALT_COMPILER(); ?>
|
||||
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 11 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite11.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -20,4 +19,4 @@ echo "ok\n";
|
||||
__HALT_COMPILER(); ?>
|
||||
"
|
||||
6685
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 12 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite12.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -22,4 +21,4 @@ array(2) {
|
||||
["hash_type"]=>
|
||||
string(3) "MD5"
|
||||
}
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 13 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite13.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
|
||||
@@ -13,4 +12,4 @@ files/write13.phar
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(true)
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 14 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite14.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
|
||||
@@ -13,4 +12,4 @@ files/write14.phar
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(false)
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 15 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite15.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -12,4 +11,4 @@ files/write15.phar
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(true)
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 16 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite16.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -12,4 +11,4 @@ files/write16.phar
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(false)
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 17 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite17.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -12,4 +11,4 @@ files/write17.phar
|
||||
--EXPECTF--
|
||||
NULL
|
||||
%string|unicode%(2) "hi"
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 18 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite18.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -12,4 +11,4 @@ files/write18.phar
|
||||
--EXPECTF--
|
||||
100666
|
||||
100444
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 19 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite19.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -12,4 +11,4 @@ files/write19.phar
|
||||
--EXPECTF--
|
||||
string(2) "hi"
|
||||
%string|unicode%(3) "hi2"
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 2 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite2.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -15,4 +14,4 @@ bool(true)
|
||||
string(2) "hi"
|
||||
bool(true)
|
||||
bool(true)
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 20 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite20.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
--FILE_EXTERNAL--
|
||||
@@ -12,4 +11,4 @@ files/write20.phar
|
||||
--EXPECTF--
|
||||
string(2) "hi"
|
||||
NULL
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 21 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite21.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
|
||||
@@ -13,4 +12,4 @@ files/write21.phar
|
||||
--EXPECTF--
|
||||
bool(false)
|
||||
bool(true)
|
||||
ok
|
||||
ok
|
||||
@@ -4,7 +4,6 @@ Phar: copy-on-write test 22 [cache_list]
|
||||
default_charset=UTF-8
|
||||
phar.cache_list={PWD}/copyonwrite22.phar.php
|
||||
phar.readonly=0
|
||||
detect_unicode=0
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("phar")) die("skip"); ?>
|
||||
<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?>
|
||||
@@ -13,4 +12,4 @@ files/write22.phar
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
bool(false)
|
||||
ok
|
||||
ok
|
||||
Loaded 100 of 219 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user