mirror of
https://github.com/php/php-src.git
synced 2026-04-14 19:41:05 +02:00
Merge branch 'master' of https://github.com/php/php-src into feature-getcolumnmeta
This commit is contained in:
125
CONTRIBUTING.md
125
CONTRIBUTING.md
@@ -76,3 +76,128 @@ issues.
|
||||
Although not a formal channel, you can also find a number of core developers on
|
||||
the #php.pecl channel on [EFnet](http://www.efnet.org/). Similarly, many
|
||||
documentation writers can be found on #php.doc.
|
||||
|
||||
## PHP source code directory structure
|
||||
|
||||
PHP source code also includes several files generated during development and
|
||||
several parts where maintenance is happening upstream in their respective
|
||||
locations.
|
||||
|
||||
```bash
|
||||
<php-src>/
|
||||
├─ .git/ # Git configuration and source directory
|
||||
└─ TSRM/ # Thread Safe Resource Manager
|
||||
└─ m4/ # https://github.com/autoconf-archive/autoconf-archive
|
||||
└─ ax_func_which_gethostbyname_r.m4
|
||||
└─ ...
|
||||
└─ Zend/ # Zend Engine
|
||||
├─ zend_language_scanner.c # Generated by re2c
|
||||
├─ zend_language_scanner_defs.h # Generated by re2c
|
||||
├─ zend_ini_scanner.c # Generated by re2c
|
||||
├─ zend_ini_scanner_defs.h # Generated by re2c
|
||||
├─ zend_vm_execute.h # Generated by `Zend/zend_vm_gen.php`
|
||||
├─ zend_vm_opcodes.c # Generated by `Zend/zend_vm_gen.php`
|
||||
├─ zend_vm_opcodes.h # Generated by `Zend/zend_vm_gen.php`
|
||||
└─ ...
|
||||
├─ appveyor/ # Appveyor CI service files
|
||||
└─ build/ # *nix build system files
|
||||
├─ ax_check_compile_flag.m4 # https://github.com/autoconf-archive/autoconf-archive
|
||||
├─ ax_gcc_func_attribute.m4 # https://github.com/autoconf-archive/autoconf-archive
|
||||
├─ libtool.m4 # https://git.savannah.gnu.org/cgit/libtool.git
|
||||
├─ shtool # https://www.gnu.org/software/shtool/
|
||||
└─ ...
|
||||
└─ ext/ # PHP core extensions
|
||||
└─ bcmath/
|
||||
├─ libbcmath/ # Forked and maintained in php-src
|
||||
└─ ...
|
||||
└─ curl/
|
||||
├─ sync-constants.php # The curl symbols checker
|
||||
└─ ...
|
||||
└─ date/
|
||||
└─ lib/ # Bundled datetime library https://github.com/derickr/timelib
|
||||
├─ parse_date.c # Generated by re2c 0.15.3
|
||||
├─ parse_iso_intervals.c # Generated by re2c 0.15.3
|
||||
└─ ...
|
||||
└─ ...
|
||||
└─ fileinfo/
|
||||
├─ libmagic/ # Modified libmagic https://github.com/file/file
|
||||
├─ data_file.c # Generated by `ext/fileinfo/create_data_file.php`
|
||||
├─ libmagic.patch # Modifications patch from upstream libmagic
|
||||
├─ magicdata.patch # Modifications patch from upstream libmagic
|
||||
└─ ...
|
||||
└─ gd/
|
||||
├─ libgd/ # Bundled and modified GD library https://github.com/libgd/libgd
|
||||
└─ ...
|
||||
└─ json/
|
||||
├─ json_parser.tab.c # Generated by bison
|
||||
├─ json_parser.tab.h # Generated by bison
|
||||
├─ json_scanner.c # Generated by re2c
|
||||
├─ php_json_scanner_defs.h # Generated by re2c
|
||||
└─ ...
|
||||
└─ mbstring/
|
||||
├─ libmbfl/ # Forked and maintained in php-src
|
||||
├─ oniguruma/ # Bundled https://github.com/kkos/oniguruma
|
||||
├─ oniguruma.patch # Modifications patch from upstream oniguruma
|
||||
├─ unicode_data.h # Generated by `ext/mbstring/ucgendat/ucgendat.php`
|
||||
└─ ...
|
||||
└─ pcre/
|
||||
├─ pcre2lib/ # https://www.pcre.org/
|
||||
└─ ...
|
||||
└─ pdo/
|
||||
├─ pdo_sql_parser.c # Generated by re2c
|
||||
└─ ...
|
||||
└─ phar/
|
||||
├─ phar_path_check.c # Generated by re2c
|
||||
└─ ...
|
||||
└─ skeleton/ # Skeleton for developing new extensions with `ext/ext_skel.php`
|
||||
└─ ...
|
||||
└─ sqlite3/
|
||||
├─ libsqlite/ # https://www.sqlite.org mirror: https://github.com/mackyle/sqlite
|
||||
└─ ...
|
||||
└─ standard/
|
||||
└─ html_tables/
|
||||
├─ mappings/ # https://www.unicode.org/Public/MAPPINGS/
|
||||
└─ ...
|
||||
├─ credits_ext.h # Generated by `scripts/dev/credits`
|
||||
├─ credits_sapi.h # Generated by `scripts/dev/credits`
|
||||
├─ html_tables.h # Generated by `ext/standard/html_tables/html_table_gen.php`
|
||||
├─ url_scanner_ex.c # Generated by re2c
|
||||
├─ var_unserializer.c # Generated by re2c
|
||||
└─ ...
|
||||
└─ tokenizer/
|
||||
├─ tokenizer_data.c # Generated by `ext/tokenizer/tokenizer_data_gen.sh`
|
||||
└─ ...
|
||||
└─ xmlrpc/
|
||||
├─ libxmlrpc/ # Forked and maintained in php-src
|
||||
└─ ...
|
||||
└─ zend_test # For testing internal APIs. Not needed for regular builds.
|
||||
└─ ...
|
||||
└─ zip/ # Bundled https://github.com/pierrejoye/php_zip
|
||||
└─ ...
|
||||
└─ ...
|
||||
└─ main/ # Binding that ties extensions, SAPIs, and engine together
|
||||
├─ streams/ # Streams layer subsystem
|
||||
├─ php_version.h # Generated by release managers using `configure`
|
||||
└─ ...
|
||||
├─ pear/ # PEAR installation
|
||||
└─ sapi/ # PHP SAPI modules
|
||||
└─ cli/
|
||||
├─ mime_type_map.h # Generated by `sapi/cli/generate_mime_type_map.php`
|
||||
└─ ...
|
||||
└─ phpdbg/
|
||||
├─ phpdbg_lexer.c # Generated by re2c
|
||||
├─ phpdbg_parser.c # Generated by bison
|
||||
├─ phpdbg_parser.h # Generated by bison
|
||||
└─ ...
|
||||
└─ ...
|
||||
├─ scripts/ # php-config, phpize and internal development scripts
|
||||
├─ tests/ # Core features tests
|
||||
├─ travis/ # Travis CI service files
|
||||
└─ win32/ # Windows build system files
|
||||
├─ cp_enc_map.c # Generated by `win32/cp_enc_map_gen.exe`
|
||||
└─ ...
|
||||
├─ config.guess # https://git.savannah.gnu.org/cgit/config.git
|
||||
├─ config.sub # https://git.savannah.gnu.org/cgit/config.git
|
||||
├─ ltmain.sh # https://git.savannah.gnu.org/cgit/libtool.git
|
||||
└─ ...
|
||||
```
|
||||
|
||||
3
NEWS
3
NEWS
@@ -11,6 +11,9 @@ PHP NEWS
|
||||
. Changed default of $variant parameter of idn_to_ascii() and idn_to_utf8().
|
||||
(cmb)
|
||||
|
||||
- PDO_SQLite:
|
||||
. Implemented sqlite_stmt_readonly in PDO_SQLite. (BohwaZ)
|
||||
|
||||
- SQLite3:
|
||||
. Updated to SQLite 3.25.1. (cmb)
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@ PHP 7.4 UPGRADE NOTES
|
||||
2. New Features
|
||||
========================================
|
||||
|
||||
- PDO_SQLite:
|
||||
. PDOStatement::getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT) allows to
|
||||
check whether this statement is read-only, i.e. whether it doesn't modify
|
||||
the database.
|
||||
|
||||
========================================
|
||||
3. Changes in SAPI modules
|
||||
========================================
|
||||
@@ -58,6 +63,9 @@ PHP 7.4 UPGRADE NOTES
|
||||
- Intl:
|
||||
. The Intl extension now requires at least ICU 50.1.
|
||||
|
||||
- Libxml:
|
||||
. All libxml based extensions now require libxml 2.7.6 or newer.
|
||||
|
||||
- Reflection:
|
||||
. Numeric value of class, property, function and constant modifiers was
|
||||
changed. Don't filter methods and properties through
|
||||
|
||||
@@ -42,6 +42,10 @@ PHP 7.4 INTERNALS UPGRADE NOTES
|
||||
|
||||
d. zend_check_private() is removed. Use (func->common.scope == scope) instead.
|
||||
|
||||
e. Pointers returned by php_win32_error_to_msg() have to be freed using
|
||||
php_win32_error_msg_free(). Same regarding php_win_err() vs.
|
||||
php_win_err_free().
|
||||
|
||||
========================
|
||||
2. Build system changes
|
||||
========================
|
||||
|
||||
@@ -11,7 +11,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
}
|
||||
|
||||
spl_autoload_register(function ($class) {
|
||||
if (!require_once($class.'.php')) {
|
||||
if (!require_once($class.'.inc')) {
|
||||
error_log('Error: Autoload class: '.$class.' not found!');
|
||||
}
|
||||
});
|
||||
|
||||
0
Zend/tests/bug39542/bug39542.php → Zend/tests/bug39542/bug39542.inc
Executable file → Normal file
0
Zend/tests/bug39542/bug39542.php → Zend/tests/bug39542/bug39542.inc
Executable file → Normal file
@@ -9,7 +9,7 @@ error_reporting=-1
|
||||
|
||||
spl_autoload_register(function($classname) {
|
||||
if (in_array($classname, array('a','b','c'))) {
|
||||
require_once __DIR__ . "/{$classname}.php";
|
||||
require_once __DIR__ . "/{$classname}.inc";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ bug67436: E_STRICT instead of custom error handler
|
||||
|
||||
spl_autoload_register(function($classname) {
|
||||
if (in_array($classname, array('a','b','c'))) {
|
||||
require_once __DIR__ . "/{$classname}.php";
|
||||
require_once __DIR__ . "/{$classname}.inc";
|
||||
}
|
||||
});
|
||||
|
||||
@@ -15,6 +15,6 @@ $b = new b();
|
||||
$b->test();
|
||||
|
||||
--EXPECTF--
|
||||
Warning: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s%ebug67436%eb.php on line %d
|
||||
Warning: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s%ebug67436%eb.inc on line %d
|
||||
b::test()
|
||||
a::test(c::TESTCONSTANT)
|
||||
|
||||
0
Zend/tests/constants/fixtures/folder1/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder1/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder1/subfolder1/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder1/subfolder1/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder1/subfolder2/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder1/subfolder2/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder1/subfolder3/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder1/subfolder3/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder1/subfolder4/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder1/subfolder4/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder2/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder2/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder2/subfolder1/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder2/subfolder1/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder2/subfolder2/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder2/subfolder2/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder2/subfolder3/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder2/subfolder3/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder2/subfolder4/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder2/subfolder4/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder3/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder3/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder3/subfolder1/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder3/subfolder1/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder3/subfolder2/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder3/subfolder2/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder3/subfolder3/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder3/subfolder3/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder3/subfolder4/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder3/subfolder4/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder4/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder4/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder4/subfolder1/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder4/subfolder1/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder4/subfolder2/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder4/subfolder2/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder4/subfolder3/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder4/subfolder3/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder4/subfolder4/fixture.inc
Executable file → Normal file
0
Zend/tests/constants/fixtures/folder4/subfolder4/fixture.inc
Executable file → Normal file
44
Zend/tests/throwing_overloaded_compound_assign_op.phpt
Normal file
44
Zend/tests/throwing_overloaded_compound_assign_op.phpt
Normal file
@@ -0,0 +1,44 @@
|
||||
--TEST--
|
||||
Exception in compound assign op should prevent call to overloaded object handlers
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public function __get($k) {
|
||||
$this->$k = 42;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
$test = new ArrayObject;
|
||||
$test[0] = 42;
|
||||
try {
|
||||
$test[0] %= 0;
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
var_dump($test);
|
||||
|
||||
$test2 = new Test;
|
||||
try {
|
||||
$test2->prop %= 0;
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage(), "\n";
|
||||
}
|
||||
var_dump($test2);
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
Modulo by zero
|
||||
object(ArrayObject)#1 (1) {
|
||||
["storage":"ArrayObject":private]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
int(42)
|
||||
}
|
||||
}
|
||||
Modulo by zero
|
||||
object(Test)#3 (1) {
|
||||
["prop"]=>
|
||||
int(42)
|
||||
}
|
||||
@@ -3,7 +3,7 @@ non-existent imported constants should not be looked up in the global table
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'includes/global_baz.php';
|
||||
require 'includes/global_baz.inc';
|
||||
|
||||
use const foo\bar\baz;
|
||||
var_dump(baz);
|
||||
|
||||
@@ -3,7 +3,7 @@ shadowing a global core constant with a local version
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'includes/foo_php_version.php';
|
||||
require 'includes/foo_php_version.inc';
|
||||
|
||||
use const foo\PHP_VERSION;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ shadowing a global constant with a local version
|
||||
<?php
|
||||
|
||||
namespace {
|
||||
require 'includes/global_bar.php';
|
||||
require 'includes/foo_bar.php';
|
||||
require 'includes/global_bar.inc';
|
||||
require 'includes/foo_bar.inc';
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -3,7 +3,7 @@ non-existent imported functions should not be looked up in the global table
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'includes/global_baz.php';
|
||||
require 'includes/global_baz.inc';
|
||||
|
||||
use function foo\bar\baz;
|
||||
var_dump(baz());
|
||||
|
||||
@@ -3,7 +3,7 @@ shadowing a global core function with a local version
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
require 'includes/foo_strlen.php';
|
||||
require 'includes/foo_strlen.inc';
|
||||
|
||||
use function foo\strlen;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ shadowing a global function with a local version
|
||||
<?php
|
||||
|
||||
namespace {
|
||||
require 'includes/global_bar.php';
|
||||
require 'includes/foo_bar.php';
|
||||
require 'includes/global_bar.inc';
|
||||
require 'includes/foo_bar.inc';
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -1144,8 +1144,9 @@ static zend_never_inline void zend_binary_assign_op_obj_dim(zval *object, zval *
|
||||
}
|
||||
ZVAL_COPY_VALUE(z, value);
|
||||
}
|
||||
binary_op(&res, Z_ISREF_P(z) ? Z_REFVAL_P(z) : z, value);
|
||||
Z_OBJ_HT_P(object)->write_dimension(object, property, &res);
|
||||
if (binary_op(&res, Z_ISREF_P(z) ? Z_REFVAL_P(z) : z, value) == SUCCESS) {
|
||||
Z_OBJ_HT_P(object)->write_dimension(object, property, &res);
|
||||
}
|
||||
if (z == &rv) {
|
||||
zval_ptr_dtor(&rv);
|
||||
}
|
||||
@@ -1538,8 +1539,9 @@ static zend_never_inline void zend_assign_op_overloaded_property(zval *object, z
|
||||
}
|
||||
ZVAL_COPY_VALUE(z, value);
|
||||
}
|
||||
binary_op(&res, z, value);
|
||||
Z_OBJ_HT(obj)->write_property(&obj, property, &res, cache_slot);
|
||||
if (binary_op(&res, z, value) == SUCCESS) {
|
||||
Z_OBJ_HT(obj)->write_property(&obj, property, &res, cache_slot);
|
||||
}
|
||||
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
|
||||
ZVAL_COPY(EX_VAR(opline->result.var), &res);
|
||||
}
|
||||
|
||||
@@ -2471,12 +2471,12 @@ AC_DEFUN([PHP_SETUP_LIBXML], [
|
||||
set $libxml_full_version
|
||||
IFS=$ac_IFS
|
||||
LIBXML_VERSION=`expr [$]1 \* 1000000 + [$]2 \* 1000 + [$]3`
|
||||
if test "$LIBXML_VERSION" -ge "2006011"; then
|
||||
if test "$LIBXML_VERSION" -ge "2007006"; then
|
||||
found_libxml=yes
|
||||
LIBXML_LIBS=`$XML2_CONFIG --libs`
|
||||
LIBXML_INCS=`$XML2_CONFIG --cflags`
|
||||
else
|
||||
AC_MSG_ERROR([libxml2 version 2.6.11 or greater required.])
|
||||
AC_MSG_ERROR([libxml2 version 2.7.6 or greater required.])
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -210,19 +210,7 @@ PHP_FUNCTION(dom_characterdata_append_data)
|
||||
}
|
||||
|
||||
DOM_GET_OBJ(nodep, id, xmlNodePtr, intern);
|
||||
#if LIBXML_VERSION < 20627
|
||||
/* Implement logic from libxml xmlTextConcat to add support for comments and PI */
|
||||
if ((nodep->content == (xmlChar *) &(nodep->properties)) ||
|
||||
((nodep->doc != NULL) && (nodep->doc->dict != NULL) &&
|
||||
xmlDictOwns(nodep->doc->dict, nodep->content))) {
|
||||
nodep->content = xmlStrncatNew(nodep->content, arg, arg_len);
|
||||
} else {
|
||||
nodep->content = xmlStrncat(nodep->content, arg, arg_len);
|
||||
}
|
||||
nodep->properties = NULL;
|
||||
#else
|
||||
xmlTextConcat(nodep, (xmlChar *) arg, arg_len);
|
||||
#endif
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} end dom_characterdata_append_data */
|
||||
|
||||
@@ -1858,11 +1858,9 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
#if LIBXML_VERSION >= 20614
|
||||
if (flags & XML_SCHEMA_VAL_VC_I_CREATE) {
|
||||
valid_opts |= XML_SCHEMA_VAL_VC_I_CREATE;
|
||||
}
|
||||
#endif
|
||||
|
||||
xmlSchemaSetValidOptions(vptr, valid_opts);
|
||||
xmlSchemaSetValidErrors(vptr, php_libxml_error_handler, php_libxml_error_handler, vptr);
|
||||
@@ -2213,11 +2211,7 @@ PHP_FUNCTION(dom_document_save_html)
|
||||
xmlBufferFree(buf);
|
||||
} else {
|
||||
int size = 0;
|
||||
#if LIBXML_VERSION >= 20623
|
||||
htmlDocDumpMemoryFormat(docp, &mem, &size, format);
|
||||
#else
|
||||
htmlDocDumpMemory(docp, &mem, &size);
|
||||
#endif
|
||||
if (!size || !mem) {
|
||||
RETVAL_FALSE;
|
||||
} else {
|
||||
|
||||
@@ -17,5 +17,5 @@ XML_FILE=/book.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=1
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentloadxml_test_method.php
|
||||
domdocumentloadxml_test_method.inc
|
||||
--EXPECT--
|
||||
|
||||
@@ -17,7 +17,7 @@ XML_FILE=/not_well_formed.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=0
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentloadxml_test_method.php
|
||||
domdocumentloadxml_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: title line 5 and book %s
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ XML_FILE=/not_well_formed2.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=0
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentloadxml_test_method.php
|
||||
domdocumentloadxml_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): AttValue: " or ' expected %s
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@ XML_FILE=/not_well_formed3.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=0
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentloadxml_test_method.php
|
||||
domdocumentloadxml_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: boOk line 8 and book %s
|
||||
|
||||
@@ -12,12 +12,11 @@ Antonio Diaz Ruiz <dejalatele@gmail.com>
|
||||
assert.bail=true
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
<?php if (LIBXML_VERSION < 20701) die("skip: libxml2 2.7.1+ required"); ?>
|
||||
--ENV--
|
||||
XML_FILE=/not_well_formed4.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=0
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentloadxml_test_method.php
|
||||
domdocumentloadxml_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): Unsupported version '3.1' %s
|
||||
|
||||
@@ -17,6 +17,6 @@ XML_FILE=/not_well_formed5.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=0
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentloadxml_test_method.php
|
||||
domdocumentloadxml_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): Extra content at the end of the document %s
|
||||
|
||||
@@ -17,5 +17,5 @@ XML_FILE=/book_with_dtd2.xml
|
||||
LOAD_OPTIONS=LIBXML_DTDLOAD
|
||||
EXPECTED_RESULT=1
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentloadxml_test_method.php
|
||||
domdocumentloadxml_test_method.inc
|
||||
--EXPECT--
|
||||
|
||||
@@ -17,6 +17,6 @@ XML_FILE=/wrong_book_with_dtd2.xml
|
||||
LOAD_OPTIONS=LIBXML_DTDVALID
|
||||
EXPECTED_RESULT=1
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentloadxml_test_method.php
|
||||
domdocumentloadxml_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): Element book content does not follow the DTD, expecting (title , author), got (title author author ) %s
|
||||
|
||||
@@ -18,5 +18,5 @@ XML_FILE=/wrong_book_with_dtd.xml
|
||||
LOAD_OPTIONS=LIBXML_DTDVALID | LIBXML_NOERROR
|
||||
EXPECTED_RESULT=1
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentloadxml_test_method.php
|
||||
domdocumentloadxml_test_method.inc
|
||||
--EXPECT--
|
||||
|
||||
@@ -18,7 +18,7 @@ XML_FILE=/book_with_dtd2.xml
|
||||
LOAD_OPTIONS=LIBXML_DTDATTR|LIBXML_NOCDATA|LIBXML_NOENT|LIBXML_NOBLANKS
|
||||
EXPECTED_RESULT=1
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentloadxml_test_method_savexml.php
|
||||
domdocumentloadxml_test_method_savexml.inc
|
||||
--EXPECT--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE books [
|
||||
|
||||
@@ -17,5 +17,5 @@ XML_FILE=/book.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=1
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentload_test_method.php
|
||||
domdocumentload_test_method.inc
|
||||
--EXPECT--
|
||||
|
||||
@@ -17,7 +17,7 @@ XML_FILE=/not_well_formed.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=0
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentload_test_method.php
|
||||
domdocumentload_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: title line 5 and book %s
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ XML_FILE=/not_well_formed2.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=0
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentload_test_method.php
|
||||
domdocumentload_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): AttValue: " or ' expected %s
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@ XML_FILE=/not_well_formed3.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=0
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentload_test_method.php
|
||||
domdocumentload_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): Opening and ending tag mismatch: boOk line 8 and book %s
|
||||
|
||||
@@ -12,12 +12,11 @@ Antonio Diaz Ruiz <dejalatele@gmail.com>
|
||||
assert.bail=true
|
||||
--SKIPIF--
|
||||
<?php include('skipif.inc'); ?>
|
||||
<?php if (LIBXML_VERSION < 20701) die("skip: libxml2 2.7.1+ required"); ?>
|
||||
--ENV--
|
||||
XML_FILE=/not_well_formed4.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=0
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentload_test_method.php
|
||||
domdocumentload_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): Unsupported version '3.1' %s
|
||||
|
||||
@@ -17,6 +17,6 @@ XML_FILE=/not_well_formed5.xml
|
||||
LOAD_OPTIONS=0
|
||||
EXPECTED_RESULT=0
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentload_test_method.php
|
||||
domdocumentload_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): Extra content at the end of the document %s
|
||||
|
||||
@@ -17,5 +17,5 @@ XML_FILE=/book_with_dtd.xml
|
||||
LOAD_OPTIONS=LIBXML_DTDLOAD
|
||||
EXPECTED_RESULT=1
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentload_test_method.php
|
||||
domdocumentload_test_method.inc
|
||||
--EXPECT--
|
||||
|
||||
@@ -17,6 +17,6 @@ XML_FILE=/wrong_book_with_dtd.xml
|
||||
LOAD_OPTIONS=LIBXML_DTDVALID
|
||||
EXPECTED_RESULT=1
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentload_test_method.php
|
||||
domdocumentload_test_method.inc
|
||||
--EXPECTF--
|
||||
Warning: DOMDocument::load%r(XML){0,1}%r(): Element book content does not follow the DTD, expecting (title , author), got (title author author ) %s
|
||||
|
||||
@@ -18,5 +18,5 @@ XML_FILE=/wrong_book_with_dtd.xml
|
||||
LOAD_OPTIONS=LIBXML_DTDVALID | LIBXML_NOERROR
|
||||
EXPECTED_RESULT=1
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentload_test_method.php
|
||||
domdocumentload_test_method.inc
|
||||
--EXPECT--
|
||||
|
||||
@@ -18,7 +18,7 @@ XML_FILE=/book_with_dtd.xml
|
||||
LOAD_OPTIONS=LIBXML_DTDATTR|LIBXML_NOCDATA|LIBXML_NOENT|LIBXML_NOBLANKS
|
||||
EXPECTED_RESULT=1
|
||||
--FILE_EXTERNAL--
|
||||
domdocumentload_test_method_savexml.php
|
||||
domdocumentload_test_method_savexml.inc
|
||||
--EXPECT--
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE books SYSTEM "books.dtd">
|
||||
|
||||
0
ext/dom/tests/book-non-conforming-schema.xsd
Executable file → Normal file
0
ext/dom/tests/book-non-conforming-schema.xsd
Executable file → Normal file
0
ext/dom/tests/book-not-a-schema.xsd
Executable file → Normal file
0
ext/dom/tests/book-not-a-schema.xsd
Executable file → Normal file
0
ext/dom/tests/book.xsd
Executable file → Normal file
0
ext/dom/tests/book.xsd
Executable file → Normal file
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include(dirname(__FILE__) . '/domdocumentload_utilities.php');
|
||||
include(dirname(__FILE__) . '/domdocumentload_utilities.inc');
|
||||
|
||||
$doc = new DOMDocument();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include(dirname(__FILE__) . '/domdocumentload_utilities.php');
|
||||
include(dirname(__FILE__) . '/domdocumentload_utilities.inc');
|
||||
|
||||
$doc = new DOMDocument();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include(dirname(__FILE__) . '/domdocumentload_utilities.php');
|
||||
include(dirname(__FILE__) . '/domdocumentload_utilities.inc');
|
||||
|
||||
$doc = new DOMDocument();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include(dirname(__FILE__) . '/domdocumentload_utilities.php');
|
||||
include(dirname(__FILE__) . '/domdocumentload_utilities.inc');
|
||||
|
||||
$doc = new DOMDocument();
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
इस पृष्ठ में एक लिंक बनाने के लिये इस प्रतीक को खीचें व छोड़ें
|
||||
@@ -1 +0,0 @@
|
||||
इस पृष्ठ में एक लिंक बनाने के लिये इस प्रतीक को खच व छड
|
||||
0
ext/exif/tests/bug34704.jpg
Executable file → Normal file
0
ext/exif/tests/bug34704.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
0
ext/exif/tests/bug68113.jpg
Executable file → Normal file
0
ext/exif/tests/bug68113.jpg
Executable file → Normal file
|
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 368 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
0
ext/gd/tests/Tuffy.ttf
Executable file → Normal file
0
ext/gd/tests/Tuffy.ttf
Executable file → Normal file
@@ -1362,7 +1362,7 @@ ZEND_END_ARG_INFO()
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_hash_update_file, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, context)
|
||||
ZEND_ARG_INFO(0, filename)
|
||||
ZEND_ARG_INFO(0, context)
|
||||
ZEND_ARG_INFO(0, stream_context)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_hash_final, 0, 0, 1)
|
||||
|
||||
@@ -1354,7 +1354,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
|
||||
prev_in_left = ini_in_left = in_left;
|
||||
ini_in_p = in_p;
|
||||
|
||||
for (out_size = (char_cnt - 2) / 3; out_size > 0;) {
|
||||
for (out_size = (char_cnt - 2); out_size > 0;) {
|
||||
#if !ICONV_SUPPORTS_ERRNO
|
||||
size_t prev_out_left;
|
||||
#endif
|
||||
@@ -1418,7 +1418,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn
|
||||
break;
|
||||
}
|
||||
|
||||
out_size -= ((nbytes_required - (char_cnt - 2)) + 1) / 3;
|
||||
out_size -= ((nbytes_required - (char_cnt - 2)) + 2) / 3;
|
||||
in_left = ini_in_left;
|
||||
in_p = ini_in_p;
|
||||
}
|
||||
|
||||
@@ -5,18 +5,17 @@ Bug #53891 (iconv_mime_encode() fails to Q-encode UTF-8 string)
|
||||
if (!extension_loaded('iconv')) die('skip iconv extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$preferences = array(
|
||||
'scheme' => 'Q',
|
||||
'input-charset' => 'utf-8',
|
||||
'output-charset' => 'utf-8',
|
||||
'line-length' => 74,
|
||||
'line-break-chars' => "\r\n",
|
||||
);
|
||||
var_dump(iconv_mime_encode('subject', "d obeybiubrsfqllpdtpge…", $preferences));
|
||||
<?php
|
||||
$preferences = array(
|
||||
'scheme' => 'Q',
|
||||
'input-charset' => 'utf-8',
|
||||
'output-charset' => 'utf-8',
|
||||
'line-length' => 74,
|
||||
'line-break-chars' => "\r\n",
|
||||
);
|
||||
var_dump(iconv_mime_encode('subject', "d obeybiubrsfqllpdtpge…", $preferences));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(81) "subject: =?utf-8?Q?d=20obeybiubrsfqllp?==?utf-8?Q?dtpge?=
|
||||
=?utf-8?Q?=E2=80=A6?="
|
||||
string(54) "subject: =?utf-8?Q?d=20obeybiubrsfqllpdtpge=E2=80=A6?="
|
||||
===DONE===
|
||||
|
||||
21
ext/iconv/tests/bug66828.phpt
Normal file
21
ext/iconv/tests/bug66828.phpt
Normal file
@@ -0,0 +1,21 @@
|
||||
--TEST--
|
||||
Bug #66828 (iconv_mime_encode Q-encoding longer than it should be)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('iconv')) die('skip iconv extension not available');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$preferences = array(
|
||||
"input-charset" => "ISO-8859-1",
|
||||
"output-charset" => "UTF-8",
|
||||
"line-length" => 76,
|
||||
"line-break-chars" => "\n",
|
||||
"scheme" => "Q"
|
||||
);
|
||||
var_dump(iconv_mime_encode("Subject", "Test Test Test Test Test Test Test Test", $preferences));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(74) "Subject: =?UTF-8?Q?Test=20Test=20Test=20Test=20Test=20Test=20Test=20Test?="
|
||||
===DONE===
|
||||
@@ -805,20 +805,16 @@ static PHP_MINIT_FUNCTION(libxml)
|
||||
REGISTER_LONG_CONSTANT("LIBXML_NOCDATA", XML_PARSE_NOCDATA, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("LIBXML_NONET", XML_PARSE_NONET, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("LIBXML_PEDANTIC", XML_PARSE_PEDANTIC, CONST_CS | CONST_PERSISTENT);
|
||||
#if LIBXML_VERSION >= 20621
|
||||
REGISTER_LONG_CONSTANT("LIBXML_COMPACT", XML_PARSE_COMPACT, CONST_CS | CONST_PERSISTENT);
|
||||
REGISTER_LONG_CONSTANT("LIBXML_NOXMLDECL", XML_SAVE_NO_DECL, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
#if LIBXML_VERSION >= 20703
|
||||
REGISTER_LONG_CONSTANT("LIBXML_PARSEHUGE", XML_PARSE_HUGE, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
#if LIBXML_VERSION >= 20900
|
||||
REGISTER_LONG_CONSTANT("LIBXML_BIGLINES", XML_PARSE_BIG_LINES, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
REGISTER_LONG_CONSTANT("LIBXML_NOEMPTYTAG", LIBXML_SAVE_NOEMPTYTAG, CONST_CS | CONST_PERSISTENT);
|
||||
|
||||
/* Schema validation options */
|
||||
#if defined(LIBXML_SCHEMAS_ENABLED) && LIBXML_VERSION >= 20614
|
||||
#if defined(LIBXML_SCHEMAS_ENABLED)
|
||||
REGISTER_LONG_CONSTANT("LIBXML_SCHEMA_CREATE", XML_SCHEMA_VAL_VC_I_CREATE, CONST_CS | CONST_PERSISTENT);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -641,39 +641,6 @@ MYSQLND_METHOD(mysqlnd_stmt, send_execute)(MYSQLND_STMT * const s, const enum_my
|
||||
UPSERT_STATUS_SET_AFFECTED_ROWS_TO_ERROR(conn->upsert_status);
|
||||
|
||||
if (stmt->result && stmt->state >= MYSQLND_STMT_PREPARED && stmt->field_count) {
|
||||
/*
|
||||
We don need to copy the data from the buffers which we will clean.
|
||||
Because it has already been copied. See
|
||||
#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
|
||||
*/
|
||||
#ifdef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
|
||||
if (stmt->result_bind &&
|
||||
stmt->result_zvals_separated_once == TRUE &&
|
||||
stmt->state >= MYSQLND_STMT_USER_FETCHING)
|
||||
{
|
||||
/*
|
||||
We need to copy the data from the buffers which we will clean.
|
||||
The bound variables point to them only if the user has started
|
||||
to fetch data (MYSQLND_STMT_USER_FETCHING).
|
||||
We need to check 'result_zvals_separated_once' or we will leak
|
||||
in the following scenario
|
||||
prepare("select 1 from dual");
|
||||
execute();
|
||||
fetch(); <-- no binding, but that's not a problem
|
||||
bind_result();
|
||||
execute(); <-- here we will leak because we separate without need
|
||||
*/
|
||||
unsigned int i;
|
||||
for (i = 0; i < stmt->field_count; i++) {
|
||||
if (stmt->result_bind[i].bound == TRUE) {
|
||||
zval *result = &stmt->result_bind[i].zv;
|
||||
ZVAL_DEREF(result);
|
||||
Z_TRY_ADDREF_P(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
s->m->flush(s);
|
||||
|
||||
/*
|
||||
@@ -798,28 +765,11 @@ mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES * result, void * param, const unsign
|
||||
|
||||
ZVAL_DEREF(result);
|
||||
/* Clean what we copied last time */
|
||||
#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
|
||||
zval_ptr_dtor(result);
|
||||
#endif
|
||||
/* copy the type */
|
||||
if (stmt->result_bind[i].bound == TRUE) {
|
||||
DBG_INF_FMT("i=%u type=%u", i, Z_TYPE(current_row[i]));
|
||||
if (Z_TYPE(current_row[i]) != IS_NULL) {
|
||||
/*
|
||||
Copy the value.
|
||||
Pre-condition is that the zvals in the result_bind buffer
|
||||
have been ZVAL_NULL()-ed or to another simple type
|
||||
(int, double, bool but not string). Because of the reference
|
||||
counting the user can't delete the strings the variables point to.
|
||||
*/
|
||||
|
||||
ZVAL_COPY_VALUE(result, ¤t_row[i]);
|
||||
#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
|
||||
Z_TRY_ADDREF_P(result);
|
||||
#endif
|
||||
} else {
|
||||
ZVAL_NULL(result);
|
||||
}
|
||||
ZVAL_COPY(result, ¤t_row[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -903,24 +853,15 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES * result, void * param, const unsi
|
||||
zval *data = &result->unbuf->last_row_data[i];
|
||||
zval *result = &stmt->result_bind[i].zv;
|
||||
|
||||
ZVAL_DEREF(result);
|
||||
/*
|
||||
stmt->result_bind[i].zv has been already destructed
|
||||
in result->unbuf->m.free_last_data()
|
||||
*/
|
||||
#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
|
||||
zval_ptr_dtor(result);
|
||||
#endif
|
||||
if (!Z_ISNULL_P(data)) {
|
||||
if ((Z_TYPE_P(data) == IS_STRING) && (meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))){
|
||||
meta->fields[i].max_length = Z_STRLEN_P(data);
|
||||
}
|
||||
ZVAL_COPY_VALUE(result, data);
|
||||
/* copied data, thus also the ownership. Thus null data */
|
||||
ZVAL_NULL(data);
|
||||
} else {
|
||||
ZVAL_NULL(result);
|
||||
if (Z_TYPE_P(data) == IS_STRING && (meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))){
|
||||
meta->fields[i].max_length = Z_STRLEN_P(data);
|
||||
}
|
||||
|
||||
ZVAL_DEREF(result);
|
||||
zval_ptr_dtor(result);
|
||||
ZVAL_COPY_VALUE(result, data);
|
||||
/* copied data, thus also the ownership. Thus null data */
|
||||
ZVAL_NULL(data);
|
||||
}
|
||||
}
|
||||
MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_PS_UNBUF);
|
||||
@@ -1089,28 +1030,19 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, void * param, const unsigned
|
||||
zval *result = &stmt->result_bind[i].zv;
|
||||
|
||||
ZVAL_DEREF(result);
|
||||
/*
|
||||
stmt->result_bind[i].zv has been already destructed
|
||||
in result->unbuf->m.free_last_data()
|
||||
*/
|
||||
#ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
|
||||
zval_ptr_dtor(result);
|
||||
#endif
|
||||
DBG_INF_FMT("i=%u bound_var=%p type=%u refc=%u", i, &stmt->result_bind[i].zv,
|
||||
Z_TYPE_P(data), Z_REFCOUNTED(stmt->result_bind[i].zv)?
|
||||
Z_REFCOUNT(stmt->result_bind[i].zv) : 0);
|
||||
|
||||
if (!Z_ISNULL_P(data)) {
|
||||
if ((Z_TYPE_P(data) == IS_STRING) &&
|
||||
(meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))) {
|
||||
meta->fields[i].max_length = Z_STRLEN_P(data);
|
||||
}
|
||||
ZVAL_COPY_VALUE(result, data);
|
||||
/* copied data, thus also the ownership. Thus null data */
|
||||
ZVAL_NULL(data);
|
||||
} else {
|
||||
ZVAL_NULL(result);
|
||||
if (Z_TYPE_P(data) == IS_STRING &&
|
||||
(meta->fields[i].max_length < (zend_ulong) Z_STRLEN_P(data))) {
|
||||
meta->fields[i].max_length = Z_STRLEN_P(data);
|
||||
}
|
||||
|
||||
ZVAL_COPY_VALUE(result, data);
|
||||
/* copied data, thus also the ownership. Thus null data */
|
||||
ZVAL_NULL(data);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
The PHP License, version 3.01
|
||||
Copyright (c) 1999 - 2018 The PHP Group. All rights reserved.
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, is permitted provided that the following conditions
|
||||
@@ -9,22 +9,22 @@ are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
|
||||
3. The name "PHP" must not be used to endorse or promote products
|
||||
derived from this software without prior written permission. For
|
||||
written permission, please contact group@php.net.
|
||||
|
||||
|
||||
4. Products derived from this software may not be called "PHP", nor
|
||||
may "PHP" appear in their name, without prior written permission
|
||||
from group@php.net. You may indicate that your software works in
|
||||
conjunction with PHP by saying "Foo for PHP" instead of calling
|
||||
it "PHP Foo" or "phpfoo"
|
||||
|
||||
|
||||
5. The PHP Group may publish revised and/or new versions of the
|
||||
license from time to time. Each version will be given a
|
||||
distinguishing version number.
|
||||
@@ -41,27 +41,27 @@ are met:
|
||||
"This product includes PHP software, freely available from
|
||||
<http://www.php.net/software/>".
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
|
||||
THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
|
||||
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
|
||||
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
--------------------------------------------------------------------
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals on behalf of the PHP Group.
|
||||
|
||||
The PHP Group can be contacted via Email at group@php.net.
|
||||
|
||||
For more information on the PHP Group and the PHP project,
|
||||
For more information on the PHP Group and the PHP project,
|
||||
please see <http://www.php.net>.
|
||||
|
||||
PHP includes the Zend Engine, freely available at
|
||||
|
||||
@@ -1454,8 +1454,13 @@ void php_oci_column_hash_dtor(zval *data)
|
||||
if (column->descid) {
|
||||
if (GC_REFCOUNT(column->descid) == 1)
|
||||
zend_list_close(column->descid);
|
||||
else
|
||||
else {
|
||||
#if PHP_VERSION_ID < 70300
|
||||
GC_REFCOUNT(column->descid)--;
|
||||
#else
|
||||
GC_DELREF(column->descid);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (column->data) {
|
||||
@@ -1783,12 +1788,12 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
|
||||
timestamp = time(NULL);
|
||||
|
||||
smart_str_append_unsigned_ex(&hashed_details, session_mode, 0);
|
||||
smart_str_0(&hashed_details);
|
||||
|
||||
if (persistent) {
|
||||
smart_str_appendl_ex(&hashed_details, "pc", sizeof("pc") - 1, 0);
|
||||
}
|
||||
|
||||
smart_str_0(&hashed_details);
|
||||
|
||||
/* make it lowercase */
|
||||
php_strtolower(ZSTR_VAL(hashed_details.s), ZSTR_LEN(hashed_details.s));
|
||||
|
||||
@@ -1877,7 +1882,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
|
||||
(memcmp(ZSTR_VAL(tmp->hash_key), ZSTR_VAL(hashed_details.s),
|
||||
ZSTR_LEN(tmp->hash_key)) == 0)) {
|
||||
connection = tmp;
|
||||
#if PHP_VERSION_ID < 70300
|
||||
++GC_REFCOUNT(connection->id);
|
||||
#else
|
||||
GC_ADDREF(connection->id);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
PHP_OCI_REGISTER_RESOURCE(connection, le_pconnection);
|
||||
@@ -1887,7 +1896,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
|
||||
* decremented in the persistent helper
|
||||
*/
|
||||
if (OCI_G(old_oci_close_semantics)) {
|
||||
#if PHP_VERSION_ID < 70300
|
||||
++GC_REFCOUNT(connection->id);
|
||||
#else
|
||||
GC_ADDREF(connection->id);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
smart_str_free(&hashed_details);
|
||||
@@ -1898,7 +1911,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
|
||||
} else {
|
||||
/* we do not ping non-persistent connections */
|
||||
smart_str_free(&hashed_details);
|
||||
#if PHP_VERSION_ID < 70300
|
||||
++GC_REFCOUNT(connection->id);
|
||||
#else
|
||||
GC_ADDREF(connection->id);
|
||||
#endif
|
||||
return connection;
|
||||
}
|
||||
} /* is_open is true? */
|
||||
@@ -2052,7 +2069,11 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
|
||||
* refcount is decremented in the persistent helper
|
||||
*/
|
||||
if (OCI_G(old_oci_close_semantics)) {
|
||||
#if PHP_VERSION_ID < 70300
|
||||
++GC_REFCOUNT(connection->id);
|
||||
#else
|
||||
GC_ADDREF(connection->id);
|
||||
#endif
|
||||
}
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zend_hash_update_mem(&EG(persistent_list), connection->hash_key, (void *)&new_le, sizeof(zend_resource));
|
||||
@@ -2453,7 +2474,11 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode)
|
||||
|
||||
if (column->is_cursor) { /* REFCURSOR -> simply return the statement id */
|
||||
ZVAL_RES(value, column->stmtid);
|
||||
#if PHP_VERSION_ID < 70300
|
||||
++GC_REFCOUNT(column->stmtid);
|
||||
#else
|
||||
GC_ADDREF(column->stmtid);
|
||||
#endif
|
||||
} else if (column->is_descr) {
|
||||
|
||||
if (column->data_type != SQLT_RDD) {
|
||||
@@ -2497,7 +2522,11 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode)
|
||||
/* return the locator */
|
||||
object_init_ex(value, oci_lob_class_entry_ptr);
|
||||
add_property_resource(value, "descriptor", column->descid);
|
||||
#if PHP_VERSION_ID < 70300
|
||||
++GC_REFCOUNT(column->descid);
|
||||
#else
|
||||
GC_ADDREF(column->descid);
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
switch (column->retcode) {
|
||||
|
||||
@@ -52,7 +52,11 @@ php_oci_collection *php_oci_collection_create(php_oci_connection *connection, ch
|
||||
|
||||
collection->connection = connection;
|
||||
collection->collection = NULL;
|
||||
#if PHP_VERSION_ID < 70300
|
||||
++GC_REFCOUNT(collection->connection->id);
|
||||
#else
|
||||
GC_ADDREF(collection->connection->id);
|
||||
#endif
|
||||
|
||||
/* get type handle by name */
|
||||
PHP_OCI_CALL_RETURN(errstatus, OCITypeByName,
|
||||
|
||||
@@ -60,16 +60,28 @@ PHP_FUNCTION(oci_register_taf_callback)
|
||||
if (!zend_is_callable(callback, 0, 0)) {
|
||||
callback_name = zend_get_callable_name(callback);
|
||||
php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(callback_name));
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zend_string_release(callback_name);
|
||||
#else
|
||||
zend_string_release_ex(callback_name, 0);
|
||||
#endif
|
||||
RETURN_FALSE;
|
||||
}
|
||||
#else
|
||||
if (!zend_is_callable(callback, 0, &callback_name)) {
|
||||
php_error_docref(NULL, E_WARNING, "function '%s' is not callable", ZSTR_VAL(callback_name));
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zend_string_release(callback_name);
|
||||
#else
|
||||
zend_string_release_ex(callback_name, 0);
|
||||
#endif
|
||||
RETURN_FALSE;
|
||||
}
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zend_string_release(callback_name);
|
||||
#else
|
||||
zend_string_release_ex(callback_name, 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -141,10 +153,18 @@ PHP_FUNCTION(oci_define_by_name)
|
||||
/* if (zend_hash_add(statement->defines, name, name_len, define, sizeof(php_oci_define), (void **)&tmp_define) == SUCCESS) { */
|
||||
zvtmp = zend_string_init(name, name_len, 0);
|
||||
if ((define = zend_hash_add_new_ptr(statement->defines, zvtmp, define)) != NULL) {
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zend_string_release(zvtmp);
|
||||
#else
|
||||
zend_string_release_ex(zvtmp, 0);
|
||||
#endif
|
||||
} else {
|
||||
efree(define);
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zend_string_release(zvtmp);
|
||||
#else
|
||||
zend_string_release_ex(zvtmp, 0);
|
||||
#endif
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -1472,7 +1492,11 @@ PHP_FUNCTION(oci_fetch_all)
|
||||
zend_string *zvtmp;
|
||||
zvtmp = zend_string_init(columns[ i ]->name, columns[ i ]->name_len, 0);
|
||||
zend_symtable_update(Z_ARRVAL(row), zvtmp, &element);
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zend_string_release(zvtmp);
|
||||
#else
|
||||
zend_string_release_ex(zvtmp, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1507,7 +1531,11 @@ PHP_FUNCTION(oci_fetch_all)
|
||||
array_init(&tmp);
|
||||
zvtmp = zend_string_init(columns[ i ]->name, columns[ i ]->name_len, 0);
|
||||
outarrs[ i ] = zend_symtable_update(Z_ARRVAL_P(array), zvtmp, &tmp);
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zend_string_release(zvtmp);
|
||||
#else
|
||||
zend_string_release_ex(zvtmp, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,11 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, zend_lon
|
||||
descriptor = ecalloc(1, sizeof(php_oci_descriptor));
|
||||
descriptor->type = (ub4) type;
|
||||
descriptor->connection = connection;
|
||||
#if PHP_VERSION_ID < 70300
|
||||
++GC_REFCOUNT(descriptor->connection->id);
|
||||
#else
|
||||
GC_ADDREF(descriptor->connection->id);
|
||||
#endif
|
||||
|
||||
PHP_OCI_CALL_RETURN(errstatus, OCIDescriptorAlloc, (connection->env, (dvoid*)&(descriptor->descriptor), descriptor->type, (size_t) 0, (dvoid **) 0));
|
||||
|
||||
|
||||
@@ -111,7 +111,11 @@ php_oci_statement *php_oci_statement_create(php_oci_connection *connection, char
|
||||
statement->impres_child_stmt = NULL;
|
||||
statement->impres_count = 0;
|
||||
statement->impres_flag = PHP_OCI_IMPRES_UNKNOWN; /* may or may not have Implicit Result Set children */
|
||||
#if PHP_VERSION_ID < 70300
|
||||
++GC_REFCOUNT(statement->connection->id);
|
||||
#else
|
||||
GC_ADDREF(statement->connection->id);
|
||||
#endif
|
||||
|
||||
if (OCI_G(default_prefetch) >= 0) {
|
||||
php_oci_statement_set_prefetch(statement, (ub4)OCI_G(default_prefetch));
|
||||
@@ -171,8 +175,13 @@ php_oci_statement *php_oci_get_implicit_resultset(php_oci_statement *statement)
|
||||
statement2->has_descr = 0;
|
||||
statement2->stmttype = 0;
|
||||
|
||||
#if PHP_VERSION_ID < 70300
|
||||
GC_REFCOUNT(statement->id)++;
|
||||
GC_REFCOUNT(statement2->connection->id)++;
|
||||
#else
|
||||
GC_ADDREF(statement->id);
|
||||
GC_ADDREF(statement2->connection->id);
|
||||
#endif
|
||||
|
||||
php_oci_statement_set_prefetch(statement2, statement->prefetch_count);
|
||||
|
||||
@@ -433,7 +442,11 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf
|
||||
return OCI_ERROR;
|
||||
}
|
||||
nested_stmt->parent_stmtid = outcol->statement->id;
|
||||
#if PHP_VERSION_ID < 70300
|
||||
++GC_REFCOUNT(outcol->statement->id);
|
||||
#else
|
||||
GC_ADDREF(outcol->statement->id);
|
||||
#endif
|
||||
outcol->nested_statement = nested_stmt;
|
||||
outcol->stmtid = nested_stmt->id;
|
||||
|
||||
@@ -595,7 +608,15 @@ int php_oci_statement_execute(php_oci_statement *statement, ub4 mode)
|
||||
for (counter = 1; counter <= colcount; counter++) {
|
||||
outcol = (php_oci_out_column *) ecalloc(1, sizeof(php_oci_out_column));
|
||||
|
||||
#if PHP_VERSION_ID < 70300
|
||||
if ((outcol = zend_hash_index_update_ptr(statement->columns, counter, outcol)) == NULL) {
|
||||
FREE_HASHTABLE(statement->columns);
|
||||
/* out of memory */
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
outcol = zend_hash_index_update_ptr(statement->columns, counter, outcol);
|
||||
#endif
|
||||
|
||||
/* get column */
|
||||
PHP_OCI_CALL_RETURN(errstatus, OCIParamGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, statement->err, (dvoid**)¶m, counter));
|
||||
@@ -989,7 +1010,12 @@ int php_oci_bind_post_exec(zval *data)
|
||||
* binds, php_oci_bind_out_callback() should have allocated a
|
||||
* new string that we can modify here.
|
||||
*/
|
||||
#if PHP_VERSION_ID < 70300
|
||||
SEPARATE_STRING(zv);
|
||||
Z_STR_P(zv) = zend_string_extend(Z_STR_P(zv), Z_STRLEN_P(zv)+1, 0);
|
||||
#else
|
||||
ZVAL_NEW_STR(zv, zend_string_extend(Z_STR_P(zv), Z_STRLEN_P(zv)+1, 0));
|
||||
#endif
|
||||
Z_STRVAL_P(zv)[ Z_STRLEN_P(zv) ] = '\0';
|
||||
} else if (Z_TYPE_P(zv) == IS_ARRAY) {
|
||||
int i;
|
||||
@@ -1252,7 +1278,11 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, size_t name_l
|
||||
zvtmp = zend_string_init(name, name_len, 0);
|
||||
bindp = (php_oci_bind *) ecalloc(1, sizeof(php_oci_bind));
|
||||
bindp = zend_hash_update_ptr(statement->binds, zvtmp, bindp);
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zend_string_release(zvtmp);
|
||||
#else
|
||||
zend_string_release_ex(zvtmp, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Make sure the minimum of value_sz is 1 to avoid ORA-3149
|
||||
@@ -1523,6 +1553,20 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zval tmp;
|
||||
/* NB: for PHP4 compat only, it should be using 'Z' instead */
|
||||
tmp = *column_index;
|
||||
zval_copy_ctor(&tmp);
|
||||
convert_to_long(&tmp);
|
||||
column = php_oci_statement_get_column(statement, Z_LVAL(tmp), NULL, 0);
|
||||
if (!column) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid column index \"" ZEND_LONG_FMT "\"", Z_LVAL(tmp));
|
||||
zval_ptr_dtor(&tmp);
|
||||
return NULL;
|
||||
}
|
||||
zval_ptr_dtor(&tmp);
|
||||
#else
|
||||
zend_long tmp;
|
||||
/* NB: for PHP4 compat only, it should be using 'Z' instead */
|
||||
|
||||
@@ -1532,6 +1576,7 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
|
||||
php_error_docref(NULL, E_WARNING, "Invalid column index \"" ZEND_LONG_FMT "\"", tmp);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return column;
|
||||
}
|
||||
@@ -1594,8 +1639,13 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
|
||||
ZEND_ASSERT(Z_ISREF_P(var));
|
||||
val = Z_REFVAL_P(var);
|
||||
#if PHP_VERSION_ID < 70300
|
||||
SEPARATE_ZVAL_NOREF(val);
|
||||
convert_to_array(val);
|
||||
#else
|
||||
convert_to_array(val);
|
||||
SEPARATE_ARRAY(val);
|
||||
#endif
|
||||
|
||||
if (maxlength < -1) {
|
||||
php_error_docref(NULL, E_WARNING, "Invalid max length value (" ZEND_LONG_FMT ")", maxlength);
|
||||
@@ -1698,7 +1748,11 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, size_t
|
||||
|
||||
zvtmp = zend_string_init(name, name_len, 0);
|
||||
zend_hash_update_ptr(statement->binds, zvtmp, bind);
|
||||
#if PHP_VERSION_ID < 70300
|
||||
zend_string_release(zvtmp);
|
||||
#else
|
||||
zend_string_release_ex(zvtmp, 0);
|
||||
#endif
|
||||
|
||||
statement->errcode = 0; /* retain backwards compat with OCI8 1.4 */
|
||||
return 0;
|
||||
|
||||
@@ -508,7 +508,7 @@ Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge)
|
||||
</notes>
|
||||
</release>
|
||||
|
||||
<release>
|
||||
<release>
|
||||
<version>
|
||||
<release>2.1.5</release>
|
||||
<api>2.1.5</api>
|
||||
@@ -520,9 +520,9 @@ Fixed bug #74625 (Integer overflow in oci_bind_array_by_name). (Ingmar Runge)
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
This version is for PHP 7 only.
|
||||
Added TAF callback support (PR #2459, KoenigsKind)
|
||||
Added TAF callback support (PR #2459, KoenigsKind)
|
||||
</notes>
|
||||
</release>
|
||||
</release>
|
||||
|
||||
<release>
|
||||
<version>
|
||||
@@ -555,7 +555,7 @@ This version is for PHP 7 only.
|
||||
Fixed bug #71148 (Bind reference overwritten on PHP 7)
|
||||
</notes>
|
||||
</release>
|
||||
|
||||
|
||||
<release>
|
||||
<version>
|
||||
<release>2.1.2</release>
|
||||
@@ -588,7 +588,7 @@ This version is for PHP 7 only.
|
||||
Fixed bug #71600 (oci_fetch_all segfaults when selecting more than 8 columns)
|
||||
</notes>
|
||||
</release>
|
||||
|
||||
|
||||
<release>
|
||||
<version>
|
||||
<release>2.1.0</release>
|
||||
@@ -601,7 +601,7 @@ Fixed bug #71600 (oci_fetch_all segfaults when selecting more than 8 columns)
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
This version is for PHP 7 only.
|
||||
Updated driver name format.
|
||||
Updated driver name format.
|
||||
</notes>
|
||||
</release>
|
||||
|
||||
@@ -661,7 +661,7 @@ Enhancement - Improve performance of multi-row OCI_RETURN_LOB queries (Bug #6687
|
||||
</stability>
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
Added oci_bind_by_name() support for PL/SQL BOOLEAN type
|
||||
Added oci_bind_by_name() support for PL/SQL BOOLEAN type
|
||||
Build change: Fix source variable definition for C89 compatibility
|
||||
</notes>
|
||||
</release>
|
||||
@@ -763,7 +763,7 @@ Add the connection handle to several DTrace probes.
|
||||
<api>devel</api>
|
||||
</stability>
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
<notes>
|
||||
Fixed --enable-maintainer-zts mode.
|
||||
Allow Implicit Result Set statement resources to inherit the parent's current prefetch count.
|
||||
Allow OCI8 to be DTrace-enabled independently from core PHP.
|
||||
@@ -781,7 +781,7 @@ Require OCI8 to be configured 'shared' when enabling DTrace support.
|
||||
<api>devel</api>
|
||||
</stability>
|
||||
<license uri="http://www.php.net/license">PHP</license>
|
||||
<notes>
|
||||
<notes>
|
||||
- NEW FUNCTIONALITY:
|
||||
|
||||
- Added Implicit Result Set support for Oracle Database 12c.
|
||||
@@ -844,7 +844,7 @@ Require OCI8 to be configured 'shared' when enabling DTrace support.
|
||||
- Regularized code prototypes and fixed some in-line documentation
|
||||
prototypes.
|
||||
|
||||
- Fixed code folding.
|
||||
- Fixed code folding.
|
||||
</notes>
|
||||
</release>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
oci_bind_array_by_name() and invalid values 1
|
||||
oci_bind_array_by_name() and invalid values 1
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
|
||||
--FILE--
|
||||
@@ -16,15 +16,15 @@ $statement = oci_parse($c, $create);
|
||||
oci_execute($statement);
|
||||
|
||||
$create_pkg = "
|
||||
CREATE OR REPLACE PACKAGE ARRAY_BIND_001_PKG AS
|
||||
TYPE ARRTYPE IS TABLE OF DATE INDEX BY BINARY_INTEGER;
|
||||
PROCEDURE iobind(c1 IN OUT ARRTYPE);
|
||||
CREATE OR REPLACE PACKAGE ARRAY_BIND_001_PKG AS
|
||||
TYPE ARRTYPE IS TABLE OF DATE INDEX BY BINARY_INTEGER;
|
||||
PROCEDURE iobind(c1 IN OUT ARRTYPE);
|
||||
END ARRAY_BIND_001_PKG;";
|
||||
$statement = oci_parse($c, $create_pkg);
|
||||
oci_execute($statement);
|
||||
|
||||
$create_pkg_body = "
|
||||
CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_001_PKG AS
|
||||
CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_001_PKG AS
|
||||
CURSOR CUR IS SELECT name FROM bind_test;
|
||||
PROCEDURE iobind(c1 IN OUT ARRTYPE) IS
|
||||
BEGIN
|
||||
@@ -58,7 +58,7 @@ var_dump($array);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: oci_bind_array_by_name(): OCI-21560: argument 3 is null, invalid, or out of range in %s on line %d
|
||||
|
||||
Warning: oci_execute(): ORA-%r(01008|57000)%r: %s in %s on line %d
|
||||
|
||||
@@ -16,15 +16,15 @@ $statement = oci_parse($c, $create);
|
||||
oci_execute($statement);
|
||||
|
||||
$create_pkg = "
|
||||
CREATE OR REPLACE PACKAGE ARRAY_BIND_002_PKG AS
|
||||
TYPE ARRTYPE IS TABLE OF DATE INDEX BY BINARY_INTEGER;
|
||||
PROCEDURE iobind(c1 IN OUT ARRTYPE);
|
||||
CREATE OR REPLACE PACKAGE ARRAY_BIND_002_PKG AS
|
||||
TYPE ARRTYPE IS TABLE OF DATE INDEX BY BINARY_INTEGER;
|
||||
PROCEDURE iobind(c1 IN OUT ARRTYPE);
|
||||
END ARRAY_BIND_002_PKG;";
|
||||
$statement = oci_parse($c, $create_pkg);
|
||||
oci_execute($statement);
|
||||
|
||||
$create_pkg_body = "
|
||||
CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_002_PKG AS
|
||||
CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_002_PKG AS
|
||||
CURSOR CUR IS SELECT name FROM bind_test;
|
||||
PROCEDURE iobind(c1 IN OUT ARRTYPE) IS
|
||||
BEGIN
|
||||
@@ -58,7 +58,7 @@ var_dump($array);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: oci_bind_array_by_name(): Maximum array length must be greater than zero in %s on line %d
|
||||
|
||||
Warning: oci_execute(): ORA-%r(01008|57000)%r: %s in %s on line %d
|
||||
|
||||
@@ -4,7 +4,7 @@ oci_bind_array_by_name() and invalid values 3
|
||||
<?php
|
||||
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
|
||||
require(dirname(__FILE__).'/skipif.inc');
|
||||
?>
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -19,15 +19,15 @@ $statement = oci_parse($c, $create);
|
||||
oci_execute($statement);
|
||||
|
||||
$create_pkg = "
|
||||
CREATE OR REPLACE PACKAGE ARRAY_BIND_003_PKG AS
|
||||
TYPE ARRTYPE IS TABLE OF DATE INDEX BY BINARY_INTEGER;
|
||||
PROCEDURE iobind(c1 IN OUT ARRTYPE);
|
||||
CREATE OR REPLACE PACKAGE ARRAY_BIND_003_PKG AS
|
||||
TYPE ARRTYPE IS TABLE OF DATE INDEX BY BINARY_INTEGER;
|
||||
PROCEDURE iobind(c1 IN OUT ARRTYPE);
|
||||
END ARRAY_BIND_003_PKG;";
|
||||
$statement = oci_parse($c, $create_pkg);
|
||||
oci_execute($statement);
|
||||
|
||||
$create_pkg_body = "
|
||||
CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_003_PKG AS
|
||||
CREATE OR REPLACE PACKAGE BODY ARRAY_BIND_003_PKG AS
|
||||
CURSOR CUR IS SELECT name FROM bind_test;
|
||||
PROCEDURE iobind(c1 IN OUT ARRTYPE) IS
|
||||
BEGIN
|
||||
@@ -61,7 +61,7 @@ var_dump($array);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECTF--
|
||||
Warning: oci_execute(): ORA-01403: %s
|
||||
ORA-06512: at "%s.ARRAY_BIND_003_PKG", line %d
|
||||
ORA-06512: at line %d in %sarray_bind_003.php on line %d
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user