From 32c7c433ac1983c4497349051681a4f361d3d33e Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Tue, 6 Jun 2023 18:49:32 -0400 Subject: [PATCH 001/120] Fix wrong backporting of previous soap patch --- ext/soap/php_http.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 77ed21d4f0f4..37250a6bdcd1 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -672,9 +672,9 @@ int make_http_soap_request(zval *this_ptr, if (UNEXPECTED(php_random_bytes_throw(&nonce, sizeof(nonce)) != SUCCESS)) { ZEND_ASSERT(EG(exception)); php_stream_close(stream); - convert_to_null(Z_CLIENT_HTTPURL_P(this_ptr)); - convert_to_null(Z_CLIENT_HTTPSOCKET_P(this_ptr)); - convert_to_null(Z_CLIENT_USE_PROXY_P(this_ptr)); + zend_hash_str_del(Z_OBJPROP_P(this_ptr), "httpurl", sizeof("httpurl")-1); + zend_hash_str_del(Z_OBJPROP_P(this_ptr), "httpsocket", sizeof("httpsocket")-1); + zend_hash_str_del(Z_OBJPROP_P(this_ptr), "_use_proxy", sizeof("_use_proxy")-1); smart_str_free(&soap_headers_z); smart_str_free(&soap_headers); return FALSE; From be71cadc2f899bc39fe27098042139392e2187db Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 22 Jun 2023 08:03:25 +0200 Subject: [PATCH 002/120] [ci skip] add CVE in NEWS --- NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ff0d216d435c..00ea5c7dd89d 100644 --- a/NEWS +++ b/NEWS @@ -7,7 +7,8 @@ PHP NEWS - Soap: . Fixed bug GHSA-76gg-c692-v2mw (Missing error check and insufficient random - bytes in HTTP Digest authentication for SOAP). (nielsdos, timwolla) + bytes in HTTP Digest authentication for SOAP). + (CVE-2023-3247) (nielsdos, timwolla) 14 Feb 2023, PHP 8.0.28 From bf4e7bd3ed8bf0ae0e559a794bb4f327d77e10e2 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 25 Jul 2023 21:09:47 +0200 Subject: [PATCH 003/120] Fix GH-11791: Wrong default value of DOMDocument::xmlStandalone At one point this was changed from a bool to an int in libxml2, with negative values meaning it is unspecified. Because it is cast to a bool this therefore returned true instead of the expected false. Closes GH-11793. --- NEWS | 2 + ext/dom/document.c | 2 +- ext/dom/tests/domobject_debug_handler.phpt | 132 +++++++++++++-------- ext/dom/tests/gh11791.phpt | 39 ++++++ 4 files changed, 126 insertions(+), 49 deletions(-) create mode 100644 ext/dom/tests/gh11791.phpt diff --git a/NEWS b/NEWS index 52aa8b3bcf07..989e53f28503 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ PHP NEWS (nielsdos) . Fix DOMCharacterData::replaceWith() with itself. (nielsdos) . Fix empty argument cases for DOMParentNode methods. (nielsdos) + . Fixed bug GH-11791 (Wrong default value of DOMDocument::xmlStandalone). + (nielsdos) - FFI: . Fix leaking definitions when using FFI::cdef()->new(...). (ilutov) diff --git a/ext/dom/document.c b/ext/dom/document.c index 71e12b6e7a95..e0eeb80fcb7e 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -187,7 +187,7 @@ int dom_document_standalone_read(dom_object *obj, zval *retval) return FAILURE; } - ZVAL_BOOL(retval, docp->standalone); + ZVAL_BOOL(retval, docp->standalone > 0); return SUCCESS; } diff --git a/ext/dom/tests/domobject_debug_handler.phpt b/ext/dom/tests/domobject_debug_handler.phpt index 8dbaa61a1654..517507105452 100644 --- a/ext/dom/tests/domobject_debug_handler.phpt +++ b/ext/dom/tests/domobject_debug_handler.phpt @@ -12,53 +12,89 @@ XML; $d = new domdocument; $d->dynamicProperty = new stdclass; $d->loadXML($xml); -print_r($d); +var_dump($d); ?> ---EXPECTF-- -DOMDocument Object -( - [config] => - [dynamicProperty] => stdClass Object - ( - ) - - [doctype] => - [implementation] => (object value omitted) - [documentElement] => (object value omitted) - [actualEncoding] => - [encoding] => - [xmlEncoding] => - [standalone] => 1 - [xmlStandalone] => 1 - [version] => 1.0 - [xmlVersion] => 1.0 - [strictErrorChecking] => 1 - [documentURI] => %s - [formatOutput] => - [validateOnParse] => - [resolveExternals] => - [preserveWhiteSpace] => 1 - [recover] => - [substituteEntities] => - [firstElementChild] => (object value omitted) - [lastElementChild] => (object value omitted) - [childElementCount] => 1 - [nodeName] => #document - [nodeValue] => - [nodeType] => 9 - [parentNode] => - [childNodes] => (object value omitted) - [firstChild] => (object value omitted) - [lastChild] => (object value omitted) - [previousSibling] => - [nextSibling] => - [attributes] => - [ownerDocument] => - [namespaceURI] => - [prefix] => - [localName] => - [baseURI] => %s - [textContent] => +--EXPECT-- +object(DOMDocument)#1 (39) { + ["config"]=> + NULL + ["dynamicProperty"]=> + object(stdClass)#2 (0) { + } + ["doctype"]=> + NULL + ["implementation"]=> + string(22) "(object value omitted)" + ["documentElement"]=> + string(22) "(object value omitted)" + ["actualEncoding"]=> + NULL + ["encoding"]=> + NULL + ["xmlEncoding"]=> + NULL + ["standalone"]=> + bool(false) + ["xmlStandalone"]=> + bool(false) + ["version"]=> + string(3) "1.0" + ["xmlVersion"]=> + string(3) "1.0" + ["strictErrorChecking"]=> + bool(true) + ["documentURI"]=> + string(46) "/run/media/niels/MoreData/php-src-FOR-MERGING/" + ["formatOutput"]=> + bool(false) + ["validateOnParse"]=> + bool(false) + ["resolveExternals"]=> + bool(false) + ["preserveWhiteSpace"]=> + bool(true) + ["recover"]=> + bool(false) + ["substituteEntities"]=> + bool(false) + ["firstElementChild"]=> + string(22) "(object value omitted)" + ["lastElementChild"]=> + string(22) "(object value omitted)" + ["childElementCount"]=> + int(1) + ["nodeName"]=> + string(9) "#document" + ["nodeValue"]=> + NULL + ["nodeType"]=> + int(9) + ["parentNode"]=> + NULL + ["childNodes"]=> + string(22) "(object value omitted)" + ["firstChild"]=> + string(22) "(object value omitted)" + ["lastChild"]=> + string(22) "(object value omitted)" + ["previousSibling"]=> + NULL + ["nextSibling"]=> + NULL + ["attributes"]=> + NULL + ["ownerDocument"]=> + NULL + ["namespaceURI"]=> + NULL + ["prefix"]=> + string(0) "" + ["localName"]=> + NULL + ["baseURI"]=> + string(46) "/run/media/niels/MoreData/php-src-FOR-MERGING/" + ["textContent"]=> + string(12) " foobar - -) +" +} diff --git a/ext/dom/tests/gh11791.phpt b/ext/dom/tests/gh11791.phpt new file mode 100644 index 000000000000..22d94b51312a --- /dev/null +++ b/ext/dom/tests/gh11791.phpt @@ -0,0 +1,39 @@ +--TEST-- +GH-11791 (Wrong default value of DOMDocument.xmlStandalone) +--EXTENSIONS-- +dom +--FILE-- +loadXML(''); +var_dump($doc->xmlStandalone); +$doc->xmlStandalone = true; +var_dump($doc->xmlStandalone); + +$doc = new DOMDocument(); +$doc->loadXML(''); +var_dump($doc->xmlStandalone); +$doc->xmlStandalone = true; +var_dump($doc->xmlStandalone); + +$doc = new DOMDocument(); +$doc->loadXML(''); +var_dump($doc->xmlStandalone); +$doc->xmlStandalone = true; +var_dump($doc->xmlStandalone); + +$doc = new DOMDocument(); +$doc->loadXML(''); +var_dump($doc->xmlStandalone); +$doc->xmlStandalone = false; +var_dump($doc->xmlStandalone); +?> +--EXPECT-- +bool(false) +bool(true) +bool(false) +bool(true) +bool(false) +bool(true) +bool(true) +bool(false) From 4bee5743e965b8c1aaa58d1a428eccdddb776304 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 25 Jul 2023 22:22:01 +0200 Subject: [PATCH 004/120] Fix GH-11792: LIBXML_NOXMLDECL is not implemented or broken Fixes GH-11792. Closes GH-11794. --- NEWS | 4 ++ ext/dom/document.c | 66 ++++++++++++------- .../DOMDocument_saveXML_XML_SAVE_NO_DECL.phpt | 24 +++++++ 3 files changed, 70 insertions(+), 24 deletions(-) create mode 100644 ext/dom/tests/DOMDocument_saveXML_XML_SAVE_NO_DECL.phpt diff --git a/NEWS b/NEWS index 90283ae15398..982898615a32 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,10 @@ PHP NEWS - Core: . Fixed oss-fuzz #60741 (Leak in open_basedir). (ilutov) +- DOM: + . Fixed bug GH-11792 (LIBXML_NOXMLDECL is not implemented or broken). + (nielsdos) + - FFI: . Fix leaking definitions when using FFI::cdef()->new(...). (ilutov) diff --git a/ext/dom/document.c b/ext/dom/document.c index ca136630ed36..2ee5435d8d28 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -23,6 +23,7 @@ #if defined(HAVE_LIBXML) && defined(HAVE_DOM) #include "php_dom.h" #include +#include #ifdef LIBXML_SCHEMAS_ENABLED #include #include @@ -1462,9 +1463,9 @@ PHP_METHOD(DOMDocument, saveXML) xmlDoc *docp; xmlNode *node; xmlBufferPtr buf; - xmlChar *mem; + const xmlChar *mem; dom_object *intern, *nodeobj; - int size, format, saveempty = 0; + int size, format, old_xml_save_no_empty_tags; zend_long options = 0; id = ZEND_THIS; @@ -1484,42 +1485,59 @@ PHP_METHOD(DOMDocument, saveXML) php_dom_throw_error(WRONG_DOCUMENT_ERR, dom_get_strict_error(intern->document)); RETURN_FALSE; } + buf = xmlBufferCreate(); if (!buf) { php_error_docref(NULL, E_WARNING, "Could not fetch buffer"); RETURN_FALSE; } - if (options & LIBXML_SAVE_NOEMPTYTAG) { - saveempty = xmlSaveNoEmptyTags; - xmlSaveNoEmptyTags = 1; - } + /* Save libxml2 global, override its vaule, and restore after saving. */ + old_xml_save_no_empty_tags = xmlSaveNoEmptyTags; + xmlSaveNoEmptyTags = (options & LIBXML_SAVE_NOEMPTYTAG) ? 1 : 0; xmlNodeDump(buf, docp, node, 0, format); - if (options & LIBXML_SAVE_NOEMPTYTAG) { - xmlSaveNoEmptyTags = saveempty; - } - mem = (xmlChar*) xmlBufferContent(buf); - if (!mem) { - xmlBufferFree(buf); + xmlSaveNoEmptyTags = old_xml_save_no_empty_tags; + } else { + buf = xmlBufferCreate(); + if (!buf) { + php_error_docref(NULL, E_WARNING, "Could not fetch buffer"); RETURN_FALSE; } - RETVAL_STRING((char *) mem); - xmlBufferFree(buf); - } else { - if (options & LIBXML_SAVE_NOEMPTYTAG) { - saveempty = xmlSaveNoEmptyTags; - xmlSaveNoEmptyTags = 1; + + int converted_options = XML_SAVE_AS_XML; + if (options & XML_SAVE_NO_DECL) { + converted_options |= XML_SAVE_NO_DECL; + } + if (format) { + converted_options |= XML_SAVE_FORMAT; } + /* Save libxml2 global, override its vaule, and restore after saving. */ + old_xml_save_no_empty_tags = xmlSaveNoEmptyTags; + xmlSaveNoEmptyTags = (options & LIBXML_SAVE_NOEMPTYTAG) ? 1 : 0; /* Encoding is handled from the encoding property set on the document */ - xmlDocDumpFormatMemory(docp, &mem, &size, format); - if (options & LIBXML_SAVE_NOEMPTYTAG) { - xmlSaveNoEmptyTags = saveempty; + xmlSaveCtxtPtr ctxt = xmlSaveToBuffer(buf, (const char *) docp->encoding, converted_options); + xmlSaveNoEmptyTags = old_xml_save_no_empty_tags; + if (UNEXPECTED(!ctxt)) { + xmlBufferFree(buf); + php_error_docref(NULL, E_WARNING, "Could not create save context"); + RETURN_FALSE; } - if (!size || !mem) { + if (UNEXPECTED(xmlSaveDoc(ctxt, docp) < 0)) { + (void) xmlSaveClose(ctxt); + xmlBufferFree(buf); + php_error_docref(NULL, E_WARNING, "Could not save document"); RETURN_FALSE; } - RETVAL_STRINGL((char *) mem, size); - xmlFree(mem); + (void) xmlSaveFlush(ctxt); + (void) xmlSaveClose(ctxt); + } + mem = xmlBufferContent(buf); + if (!mem) { + xmlBufferFree(buf); + RETURN_FALSE; } + size = xmlBufferLength(buf); + RETVAL_STRINGL((const char *) mem, size); + xmlBufferFree(buf); } /* }}} end dom_document_savexml */ diff --git a/ext/dom/tests/DOMDocument_saveXML_XML_SAVE_NO_DECL.phpt b/ext/dom/tests/DOMDocument_saveXML_XML_SAVE_NO_DECL.phpt new file mode 100644 index 000000000000..240e5d498482 --- /dev/null +++ b/ext/dom/tests/DOMDocument_saveXML_XML_SAVE_NO_DECL.phpt @@ -0,0 +1,24 @@ +--TEST-- +DOMDocument::saveXML(): XML_SAVE_NO_DECL +--EXTENSIONS-- +dom +--FILE-- +loadXML('é'); + +echo $doc->saveXML(options: 0); +echo $doc->saveXML(options: LIBXML_NOXMLDECL); +$doc->encoding = "BIG5"; +echo $doc->saveXML(options: LIBXML_NOXMLDECL); + +// Edge case +$doc = new DOMDocument(); +var_dump($doc->saveXML(options: LIBXML_NOXMLDECL)); +?> +--EXPECT-- + +é +é +é +string(0) "" From bed0e5410494d2a96e92b212c05377b3fcb83f21 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:05:24 +0200 Subject: [PATCH 005/120] Fix DOM test --- ext/dom/tests/domobject_debug_handler.phpt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/dom/tests/domobject_debug_handler.phpt b/ext/dom/tests/domobject_debug_handler.phpt index 517507105452..948fd547f4d5 100644 --- a/ext/dom/tests/domobject_debug_handler.phpt +++ b/ext/dom/tests/domobject_debug_handler.phpt @@ -14,7 +14,7 @@ $d->dynamicProperty = new stdclass; $d->loadXML($xml); var_dump($d); ?> ---EXPECT-- +--EXPECTF-- object(DOMDocument)#1 (39) { ["config"]=> NULL @@ -44,7 +44,7 @@ object(DOMDocument)#1 (39) { ["strictErrorChecking"]=> bool(true) ["documentURI"]=> - string(46) "/run/media/niels/MoreData/php-src-FOR-MERGING/" + string(%d) %s ["formatOutput"]=> bool(false) ["validateOnParse"]=> @@ -92,7 +92,7 @@ object(DOMDocument)#1 (39) { ["localName"]=> NULL ["baseURI"]=> - string(46) "/run/media/niels/MoreData/php-src-FOR-MERGING/" + string(%d) %s ["textContent"]=> string(12) " foobar From 4077dad871377fba8fd66d1dddb6741adaa6212e Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 26 Jul 2023 19:18:01 +0200 Subject: [PATCH 006/120] [skip ci] Hide generated files from diff via .gitattributes (#11802) --- .gitattributes | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitattributes b/.gitattributes index a5318009efdb..ccf0353eec4f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -19,11 +19,11 @@ *.php diff=php *.[ch] diff=cpp -# Collapse generated files within a pull request. -**/*_arginfo.h linguist-generated -/Zend/zend_vm_execute.h linguist-generated -/Zend/zend_vm_handlers.h linguist-generated -/Zend/zend_vm_opcodes.[ch] linguist-generated +# Collapse generated files within git and pull request diff. +**/*_arginfo.h linguist-generated -diff +/Zend/zend_vm_execute.h linguist-generated -diff +/Zend/zend_vm_handlers.h linguist-generated -diff +/Zend/zend_vm_opcodes.[ch] linguist-generated -diff # The OSS fuzz files are bunary /ext/date/tests/ossfuzz*.txt binary From 6b6a5cd28ed7ecb3eb4ef7eb5af3514e343dfab3 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 26 Jul 2023 16:53:20 +0200 Subject: [PATCH 007/120] Replace xfail with skipif in calendar_clear_variation1.phpt Fixes GH-11128 Closes GH-11801 --- ext/intl/tests/calendar_clear_variation1.phpt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ext/intl/tests/calendar_clear_variation1.phpt b/ext/intl/tests/calendar_clear_variation1.phpt index 55f23cc446f6..75f026d0521c 100644 --- a/ext/intl/tests/calendar_clear_variation1.phpt +++ b/ext/intl/tests/calendar_clear_variation1.phpt @@ -4,9 +4,12 @@ IntlCalendar::clear() 1 arg variation date.timezone=Atlantic/Azores --EXTENSIONS-- intl ---XFAIL-- -May currently fail with ICU 73. -See https://github.com/php/php-src/issues/11128 +--SKIPIF-- += 0 && version_compare(INTL_ICU_VERSION, '74.1') < 0) { + die('skip Broken for ICU >= 73.1 and < 74.1, see https://github.com/php/php-src/issues/11128'); +} +?> --FILE-- Date: Fri, 28 Jul 2023 15:42:32 +0200 Subject: [PATCH 008/120] Use new class synopsis generating markup (#11809) --- build/gen_stub.php | 83 +++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 31 deletions(-) diff --git a/build/gen_stub.php b/build/gen_stub.php index 7e3ba56984e6..1fff123d84c0 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -2735,27 +2735,15 @@ public function getClassSynopsisDocument(array $classMap, iterable $allConstInfo public function getClassSynopsisElement(DOMDocument $doc, array $classMap, iterable $allConstInfos): ?DOMElement { $classSynopsis = $doc->createElement("classsynopsis"); - if ($this->type === "interface") { - $classSynopsis->setAttribute("class", "interface"); - } - $classSynopsis->appendChild(new DOMText("\n ")); + $classSynopsis->setAttribute("class", $this->type === "interface" ? "interface" : "class"); - $ooElement = self::createOoElement($doc, $this, true, false, false, 4); + $exceptionOverride = $this->isException($classMap) ? "exception" : null; + $ooElement = self::createOoElement($doc, $this, $exceptionOverride, true, null, 4); if (!$ooElement) { return null; } + $classSynopsis->appendChild(new DOMText("\n ")); $classSynopsis->appendChild($ooElement); - $classSynopsis->appendChild(new DOMText("\n\n ")); - - $classSynopsisInfo = $doc->createElement("classsynopsisinfo"); - $classSynopsisInfo->appendChild(new DOMText("\n ")); - $ooElement = self::createOoElement($doc, $this, false, true, false, 5); - if (!$ooElement) { - return null; - } - $classSynopsisInfo->appendChild($ooElement); - - $classSynopsis->appendChild($classSynopsisInfo); foreach ($this->extends as $k => $parent) { $parentInfo = $classMap[$parent->toString()] ?? null; @@ -2766,33 +2754,32 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera $ooElement = self::createOoElement( $doc, $parentInfo, + null, false, - false, - $k === 0 && $this->type === "class", - 5 + $k === 0 ? "extends" : null, + 4 ); if (!$ooElement) { return null; } - $classSynopsisInfo->appendChild(new DOMText("\n\n ")); - $classSynopsisInfo->appendChild($ooElement); + $classSynopsis->appendChild(new DOMText("\n\n ")); + $classSynopsis->appendChild($ooElement); } - foreach ($this->implements as $interface) { + foreach ($this->implements as $k => $interface) { $interfaceInfo = $classMap[$interface->toString()] ?? null; if (!$interfaceInfo) { throw new Exception("Missing implemented interface " . $interface->toString()); } - $ooElement = self::createOoElement($doc, $interfaceInfo, false, false, false, 5); + $ooElement = self::createOoElement($doc, $interfaceInfo, null, false, $k === 0 ? "implements" : null, 4); if (!$ooElement) { return null; } - $classSynopsisInfo->appendChild(new DOMText("\n\n ")); - $classSynopsisInfo->appendChild($ooElement); + $classSynopsis->appendChild(new DOMText("\n\n ")); + $classSynopsis->appendChild($ooElement); } - $classSynopsisInfo->appendChild(new DOMText("\n ")); /** @var array $parentsWithInheritedConstants */ $parentsWithInheritedConstants = []; @@ -2921,9 +2908,9 @@ public function getClassSynopsisElement(DOMDocument $doc, array $classMap, itera private static function createOoElement( DOMDocument $doc, ClassInfo $classInfo, - bool $overrideToClass, + ?string $typeOverride, bool $withModifiers, - bool $isExtends, + ?string $modifierOverride, int $indentationLevel ): ?DOMElement { $indentation = str_repeat(" ", $indentationLevel); @@ -2933,12 +2920,12 @@ private static function createOoElement( return null; } - $type = $overrideToClass ? "class" : $classInfo->type; + $type = $typeOverride !== null ? $typeOverride : $classInfo->type; $ooElement = $doc->createElement("oo$type"); $ooElement->appendChild(new DOMText("\n$indentation ")); - if ($isExtends) { - $ooElement->appendChild($doc->createElement('modifier', 'extends')); + if ($modifierOverride !== null) { + $ooElement->appendChild($doc->createElement('modifier', $modifierOverride)); $ooElement->appendChild(new DOMText("\n$indentation ")); } elseif ($withModifiers) { if ($classInfo->flags & Class_::MODIFIER_FINAL) { @@ -3046,6 +3033,40 @@ private function collectInheritedMembers( } } + /** @param array $classMap */ + private function isException(array $classMap): bool + { + if ($this->name->toString() === "Throwable") { + return true; + } + + foreach ($this->extends as $parentName) { + $parent = $classMap[$parentName->toString()] ?? null; + if ($parent === null) { + throw new Exception("Missing parent class " . $parentName->toString()); + } + + if ($parent->isException($classMap)) { + return true; + } + } + + if ($this->type === "class") { + foreach ($this->implements as $interfaceName) { + $interface = $classMap[$interfaceName->toString()] ?? null; + if ($interface === null) { + throw new Exception("Missing implemented interface " . $interfaceName->toString()); + } + + if ($interface->isException($classMap)) { + return true; + } + } + } + + return false; + } + private function hasConstructor(): bool { foreach ($this->funcInfos as $funcInfo) { From 0893b4bed585bdf8b9269b229fb6ce89c4b5c695 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 28 Jul 2023 11:39:51 +0200 Subject: [PATCH 009/120] add ZipArchive::LENGTH_TO_END and ZipArchive::LENGTH_UNCHECKED constants --- UPGRADING | 2 ++ ext/zip/php_zip.h | 5 +++++ ext/zip/php_zip.stub.php | 19 ++++++++++++++++--- ext/zip/php_zip_arginfo.h | 20 +++++++++++++++++--- ext/zip/tests/oo_addfile.phpt | 2 +- 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/UPGRADING b/UPGRADING index 56af1f0c1d41..01ee10d9f144 100644 --- a/UPGRADING +++ b/UPGRADING @@ -483,6 +483,8 @@ PHP 8.3 UPGRADE NOTES . ZipArchive::AFL_WANT_TORRENTZIP (libzip >= 1.10) . ZipArchive::AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE (libzip >= 1.10) . ZipArchive::FL_OPEN_FILE_NOW + . ZipArchive::LENGTH_TO_END as default value for addFile and replaceFile + . ZipArchive::LENGTH_UNCHECKED (libzip >= 1.10.1) ======================================== 11. Changes to INI File Handling diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index f7c7a739d366..f57006363917 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -31,6 +31,11 @@ extern zend_module_entry zip_module_entry; #define ZIP_OVERWRITE ZIP_TRUNCATE #endif +/* since 1.10.1 */ +#ifndef ZIP_LENGTH_TO_END +#define ZIP_LENGTH_TO_END 0 +#endif + /* Additionnal flags not from libzip */ #define ZIP_FL_OPEN_FILE_NOW (1u<<30) diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php index b8807a4d56c5..aefa24b0db6e 100644 --- a/ext/zip/php_zip.stub.php +++ b/ext/zip/php_zip.stub.php @@ -459,7 +459,6 @@ class ZipArchive implements Countable public const ER_WRONGPASSWD = UNKNOWN; /* since 1.0.0 */ - #ifdef ZIP_ER_OPNOTSUPP /** * N Operation not supported @@ -721,6 +720,20 @@ class ZipArchive implements Countable */ public const LIBZIP_VERSION = UNKNOWN; + /** + * @var int + * @cvalue ZIP_LENGTH_TO_END + */ + public const LENGTH_TO_END = UNKNOWN; + /* since 1.10.1 */ +#ifdef ZIP_LENGTH_UNCHECKED + /** + * @var int + * @cvalue ZIP_LENGTH_UNCHECKED + */ + public const LENGTH_UNCHECKED = UNKNOWN; +#endif + /** @readonly */ public int $lastId; /** @readonly */ @@ -760,10 +773,10 @@ public function addEmptyDir(string $dirname, int $flags = 0): bool {} public function addFromString(string $name, string $content, int $flags = ZipArchive::FL_OVERWRITE): bool {} /** @tentative-return-type */ - public function addFile(string $filepath, string $entryname = "", int $start = 0, int $length = 0, int $flags = ZipArchive::FL_OVERWRITE): bool {} + public function addFile(string $filepath, string $entryname = "", int $start = 0, int $length = ZipArchive::LENGTH_TO_END, int $flags = ZipArchive::FL_OVERWRITE): bool {} /** @tentative-return-type */ - public function replaceFile(string $filepath, int $index, int $start = 0, int $length = 0, int $flags = 0): bool {} + public function replaceFile(string $filepath, int $index, int $start = 0, int $length = ZipArchive::LENGTH_TO_END, int $flags = 0): bool {} /** @tentative-return-type */ public function addGlob(string $pattern, int $flags = 0, array $options = []): array|false {} diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index e0198435e0fe..b17c696de8ef 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: fb9b6fa0a8e3da62a85e13b455573ee876ea2d61 */ + * Stub hash: ac1969b19efd54bb9a2b9e2f228e66f4d22000b1 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -76,7 +76,7 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_addFi ZEND_ARG_TYPE_INFO(0, filepath, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, entryname, IS_STRING, 0, "\"\"") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "ZipArchive::LENGTH_TO_END") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "ZipArchive::FL_OVERWRITE") ZEND_END_ARG_INFO() @@ -84,7 +84,7 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZipArchive_repla ZEND_ARG_TYPE_INFO(0, filepath, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, index, IS_LONG, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, start, IS_LONG, 0, "0") - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, length, IS_LONG, 0, "ZipArchive::LENGTH_TO_END") ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "0") ZEND_END_ARG_INFO() @@ -1231,6 +1231,20 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zend_declare_class_constant_ex(class_entry, const_LIBZIP_VERSION_name, &const_LIBZIP_VERSION_value, ZEND_ACC_PUBLIC, NULL); zend_string_release(const_LIBZIP_VERSION_name); + zval const_LENGTH_TO_END_value; + ZVAL_LONG(&const_LENGTH_TO_END_value, ZIP_LENGTH_TO_END); + zend_string *const_LENGTH_TO_END_name = zend_string_init_interned("LENGTH_TO_END", sizeof("LENGTH_TO_END") - 1, 1); + zend_declare_class_constant_ex(class_entry, const_LENGTH_TO_END_name, &const_LENGTH_TO_END_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(const_LENGTH_TO_END_name); +#if defined(ZIP_LENGTH_UNCHECKED) + + zval const_LENGTH_UNCHECKED_value; + ZVAL_LONG(&const_LENGTH_UNCHECKED_value, ZIP_LENGTH_UNCHECKED); + zend_string *const_LENGTH_UNCHECKED_name = zend_string_init_interned("LENGTH_UNCHECKED", sizeof("LENGTH_UNCHECKED") - 1, 1); + zend_declare_class_constant_ex(class_entry, const_LENGTH_UNCHECKED_name, &const_LENGTH_UNCHECKED_value, ZEND_ACC_PUBLIC, NULL); + zend_string_release(const_LENGTH_UNCHECKED_name); +#endif + zval property_lastId_default_value; ZVAL_UNDEF(&property_lastId_default_value); zend_string *property_lastId_name = zend_string_init("lastId", sizeof("lastId") - 1, 1); diff --git a/ext/zip/tests/oo_addfile.phpt b/ext/zip/tests/oo_addfile.phpt index 00f560e032ed..1564106c56bf 100644 --- a/ext/zip/tests/oo_addfile.phpt +++ b/ext/zip/tests/oo_addfile.phpt @@ -24,7 +24,7 @@ if (!$zip->addFile($dirname . 'utils.inc', 'mini.txt', 12, 34)) { echo "failed\n"; } var_dump($zip->lastId); -if (!$zip->addFile($dirname . 'utils.inc', 'other.txt', 0, 0, ZipArchive::FL_OPEN_FILE_NOW)) { +if (!$zip->addFile($dirname . 'utils.inc', 'other.txt', 0, ZipArchive::LENGTH_TO_END, ZipArchive::FL_OPEN_FILE_NOW)) { echo "failed\n"; } var_dump($zip->lastId); From ae3646db484c70512219379b8aa7fc426a578ecc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 28 Jul 2023 13:56:39 +0200 Subject: [PATCH 010/120] use typed constants in 8.3 --- ext/zip/php_zip.stub.php | 327 +++++++++++++------------------------- ext/zip/php_zip_arginfo.h | 220 ++++++++++++------------- 2 files changed, 219 insertions(+), 328 deletions(-) diff --git a/ext/zip/php_zip.stub.php b/ext/zip/php_zip.stub.php index aefa24b0db6e..bdd236faaa1a 100644 --- a/ext/zip/php_zip.stub.php +++ b/ext/zip/php_zip.stub.php @@ -67,671 +67,562 @@ function zip_entry_compressionmethod($zip_entry): string|false {} class ZipArchive implements Countable { /** - * @var int * @cvalue ZIP_CREATE */ - public const CREATE = UNKNOWN; + public const int CREATE = UNKNOWN; /** - * @var int * @cvalue ZIP_EXCL */ - public const EXCL = UNKNOWN; + public const int EXCL = UNKNOWN; /** - * @var int * @cvalue ZIP_CHECKCONS */ - public const CHECKCONS = UNKNOWN; + public const int CHECKCONS = UNKNOWN; /** - * @var int * @cvalue ZIP_OVERWRITE */ - public const OVERWRITE = UNKNOWN; + public const int OVERWRITE = UNKNOWN; #ifdef ZIP_RDONLY /** - * @var int * @cvalue ZIP_RDONLY */ - public const RDONLY = UNKNOWN; + public const int RDONLY = UNKNOWN; #endif /** - * @var int * @cvalue ZIP_FL_NOCASE */ - public const FL_NOCASE = UNKNOWN; + public const int FL_NOCASE = UNKNOWN; /** - * @var int * @cvalue ZIP_FL_NODIR */ - public const FL_NODIR = UNKNOWN; + public const int FL_NODIR = UNKNOWN; /** - * @var int * @cvalue ZIP_FL_COMPRESSED */ - public const FL_COMPRESSED = UNKNOWN; + public const int FL_COMPRESSED = UNKNOWN; /** - * @var int * @cvalue ZIP_FL_UNCHANGED */ - public const FL_UNCHANGED = UNKNOWN; + public const int FL_UNCHANGED = UNKNOWN; /* deprecated in libzip 1.10.0 */ #ifdef ZIP_FL_RECOMPRESS /** - * @var int * @cvalue ZIP_FL_RECOMPRESS * @deprecated */ - public const FL_RECOMPRESS = UNKNOWN; + public const int FL_RECOMPRESS = UNKNOWN; #endif /** - * @var int * @cvalue ZIP_FL_ENCRYPTED */ - public const FL_ENCRYPTED = UNKNOWN; + public const int FL_ENCRYPTED = UNKNOWN; /** - * @var int * @cvalue ZIP_FL_OVERWRITE */ - public const FL_OVERWRITE = UNKNOWN; + public const int FL_OVERWRITE = UNKNOWN; /** - * @var int * @cvalue ZIP_FL_LOCAL */ - public const FL_LOCAL = UNKNOWN; + public const int FL_LOCAL = UNKNOWN; /** - * @var int * @cvalue ZIP_FL_CENTRAL */ - public const FL_CENTRAL = UNKNOWN; + public const int FL_CENTRAL = UNKNOWN; /* Default filename encoding policy. */ /** - * @var int * @cvalue ZIP_FL_ENC_GUESS */ - public const FL_ENC_GUESS = UNKNOWN; + public const int FL_ENC_GUESS = UNKNOWN; /** - * @var int * @cvalue ZIP_FL_ENC_RAW */ - public const FL_ENC_RAW = UNKNOWN; + public const int FL_ENC_RAW = UNKNOWN; /** - * @var int * @cvalue ZIP_FL_ENC_STRICT */ - public const FL_ENC_STRICT = UNKNOWN; + public const int FL_ENC_STRICT = UNKNOWN; /** - * @var int * @cvalue ZIP_FL_ENC_UTF_8 */ - public const FL_ENC_UTF_8 = UNKNOWN; + public const int FL_ENC_UTF_8 = UNKNOWN; /** - * @var int * @cvalue ZIP_FL_ENC_CP437 */ - public const FL_ENC_CP437 = UNKNOWN; + public const int FL_ENC_CP437 = UNKNOWN; /** * Additionnal flags not from libzip - * @var int * @cvalue ZIP_FL_OPEN_FILE_NOW */ - public const FL_OPEN_FILE_NOW = UNKNOWN; + public const int FL_OPEN_FILE_NOW = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_DEFAULT */ - public const CM_DEFAULT = UNKNOWN; + public const int CM_DEFAULT = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_STORE */ - public const CM_STORE = UNKNOWN; + public const int CM_STORE = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_SHRINK */ - public const CM_SHRINK = UNKNOWN; + public const int CM_SHRINK = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_REDUCE_1 */ - public const CM_REDUCE_1 = UNKNOWN; + public const int CM_REDUCE_1 = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_REDUCE_2 */ - public const CM_REDUCE_2 = UNKNOWN; + public const int CM_REDUCE_2 = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_REDUCE_3 */ - public const CM_REDUCE_3 = UNKNOWN; + public const int CM_REDUCE_3 = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_REDUCE_4 */ - public const CM_REDUCE_4 = UNKNOWN; + public const int CM_REDUCE_4 = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_IMPLODE */ - public const CM_IMPLODE = UNKNOWN; + public const int CM_IMPLODE = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_DEFLATE */ - public const CM_DEFLATE = UNKNOWN; + public const int CM_DEFLATE = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_DEFLATE64 */ - public const CM_DEFLATE64 = UNKNOWN; + public const int CM_DEFLATE64 = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_PKWARE_IMPLODE */ - public const CM_PKWARE_IMPLODE = UNKNOWN; + public const int CM_PKWARE_IMPLODE = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_BZIP2 */ - public const CM_BZIP2 = UNKNOWN; + public const int CM_BZIP2 = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_LZMA */ - public const CM_LZMA = UNKNOWN; + public const int CM_LZMA = UNKNOWN; #ifdef ZIP_CM_LZMA2 /** - * @var int * @cvalue ZIP_CM_LZMA2 */ - public const CM_LZMA2 = UNKNOWN; + public const int CM_LZMA2 = UNKNOWN; #endif #ifdef ZIP_CM_ZSTD /** - * @var int * @cvalue ZIP_CM_ZSTD */ - public const CM_ZSTD = UNKNOWN; + public const int CM_ZSTD = UNKNOWN; #endif #ifdef ZIP_CM_XZ /** - * @var int * @cvalue ZIP_CM_XZ */ - public const CM_XZ = UNKNOWN; + public const int CM_XZ = UNKNOWN; #endif /** - * @var int * @cvalue ZIP_CM_TERSE */ - public const CM_TERSE = UNKNOWN; + public const int CM_TERSE = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_LZ77 */ - public const CM_LZ77 = UNKNOWN; + public const int CM_LZ77 = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_WAVPACK */ - public const CM_WAVPACK = UNKNOWN; + public const int CM_WAVPACK = UNKNOWN; /** - * @var int * @cvalue ZIP_CM_PPMD */ - public const CM_PPMD = UNKNOWN; + public const int CM_PPMD = UNKNOWN; /* Error code */ /** * N No error - * @var int * @cvalue ZIP_ER_OK */ - public const ER_OK = UNKNOWN; + public const int ER_OK = UNKNOWN; /** * N Multi-disk zip archives not supported - * @var int * @cvalue ZIP_ER_MULTIDISK */ - public const ER_MULTIDISK = UNKNOWN; + public const int ER_MULTIDISK = UNKNOWN; /** * S Renaming temporary file failed - * @var int * @cvalue ZIP_ER_RENAME */ - public const ER_RENAME = UNKNOWN; + public const int ER_RENAME = UNKNOWN; /** * S Closing zip archive failed - * @var int * @cvalue ZIP_ER_CLOSE */ - public const ER_CLOSE = UNKNOWN; + public const int ER_CLOSE = UNKNOWN; /** * S Seek error - * @var int * @cvalue ZIP_ER_SEEK */ - public const ER_SEEK = UNKNOWN; + public const int ER_SEEK = UNKNOWN; /** * S Read error - * @var int * @cvalue ZIP_ER_READ */ - public const ER_READ = UNKNOWN; + public const int ER_READ = UNKNOWN; /** * S Write error - * @var int * @cvalue ZIP_ER_WRITE */ - public const ER_WRITE = UNKNOWN; + public const int ER_WRITE = UNKNOWN; /** * N CRC error - * @var int * @cvalue ZIP_ER_CRC */ - public const ER_CRC = UNKNOWN; + public const int ER_CRC = UNKNOWN; /** * N Containing zip archive was closed - * @var int * @cvalue ZIP_ER_ZIPCLOSED */ - public const ER_ZIPCLOSED = UNKNOWN; + public const int ER_ZIPCLOSED = UNKNOWN; /** * N No such file - * @var int * @cvalue ZIP_ER_NOENT */ - public const ER_NOENT = UNKNOWN; + public const int ER_NOENT = UNKNOWN; /** * N File already exists - * @var int * @cvalue ZIP_ER_EXISTS */ - public const ER_EXISTS = UNKNOWN; + public const int ER_EXISTS = UNKNOWN; /** * S Can't open file - * @var int * @cvalue ZIP_ER_OPEN */ - public const ER_OPEN = UNKNOWN; + public const int ER_OPEN = UNKNOWN; /** * S Failure to create temporary file - * @var int * @cvalue ZIP_ER_TMPOPEN */ - public const ER_TMPOPEN = UNKNOWN; + public const int ER_TMPOPEN = UNKNOWN; /** * Z Zlib error - * @var int * @cvalue ZIP_ER_ZLIB */ - public const ER_ZLIB = UNKNOWN; + public const int ER_ZLIB = UNKNOWN; /** * N Malloc failure - * @var int * @cvalue ZIP_ER_MEMORY */ - public const ER_MEMORY = UNKNOWN; + public const int ER_MEMORY = UNKNOWN; /** * N Entry has been changed - * @var int * @cvalue ZIP_ER_CHANGED */ - public const ER_CHANGED = UNKNOWN; + public const int ER_CHANGED = UNKNOWN; /** * N Compression method not supported - * @var int * @cvalue ZIP_ER_COMPNOTSUPP */ - public const ER_COMPNOTSUPP = UNKNOWN; + public const int ER_COMPNOTSUPP = UNKNOWN; /** * N Premature EOF - * @var int * @cvalue ZIP_ER_EOF */ - public const ER_EOF = UNKNOWN; + public const int ER_EOF = UNKNOWN; /** * N Invalid argument - * @var int * @cvalue ZIP_ER_INVAL */ - public const ER_INVAL = UNKNOWN; + public const int ER_INVAL = UNKNOWN; /** * N Not a zip archive - * @var int * @cvalue ZIP_ER_NOZIP */ - public const ER_NOZIP = UNKNOWN; + public const int ER_NOZIP = UNKNOWN; /** * N Internal error - * @var int * @cvalue ZIP_ER_INTERNAL */ - public const ER_INTERNAL = UNKNOWN; + public const int ER_INTERNAL = UNKNOWN; /** * N Zip archive inconsistent - * @var int * @cvalue ZIP_ER_INCONS */ - public const ER_INCONS = UNKNOWN; + public const int ER_INCONS = UNKNOWN; /** * S Can't remove file - * @var int * @cvalue ZIP_ER_REMOVE */ - public const ER_REMOVE = UNKNOWN; + public const int ER_REMOVE = UNKNOWN; /** * N Entry has been deleted - * @var int * @cvalue ZIP_ER_DELETED */ - public const ER_DELETED = UNKNOWN; + public const int ER_DELETED = UNKNOWN; /** * N Encryption method not supported - * @var int * @cvalue ZIP_ER_ENCRNOTSUPP */ - public const ER_ENCRNOTSUPP = UNKNOWN; + public const int ER_ENCRNOTSUPP = UNKNOWN; /** * N Read-only archive - * @var int * @cvalue ZIP_ER_RDONLY */ - public const ER_RDONLY = UNKNOWN; + public const int ER_RDONLY = UNKNOWN; /** * N Entry has been deleted - * @var int * @cvalue ZIP_ER_NOPASSWD */ - public const ER_NOPASSWD = UNKNOWN; + public const int ER_NOPASSWD = UNKNOWN; /** * N Wrong password provided - * @var int * @cvalue ZIP_ER_WRONGPASSWD */ - public const ER_WRONGPASSWD = UNKNOWN; + public const int ER_WRONGPASSWD = UNKNOWN; /* since 1.0.0 */ #ifdef ZIP_ER_OPNOTSUPP /** * N Operation not supported - * @var int * @cvalue ZIP_ER_OPNOTSUPP */ - public const ER_OPNOTSUPP = UNKNOWN; + public const int ER_OPNOTSUPP = UNKNOWN; #endif #ifdef ZIP_ER_INUSE /** * N Resource still in use - * @var int * @cvalue ZIP_ER_INUSE */ - public const ER_INUSE = UNKNOWN; + public const int ER_INUSE = UNKNOWN; #endif #ifdef ZIP_ER_TELL /** * S Tell error - * @var int * @cvalue ZIP_ER_TELL */ - public const ER_TELL = UNKNOWN; + public const int ER_TELL = UNKNOWN; #endif /* since 1.6.0 */ #ifdef ZIP_ER_COMPRESSED_DATA /** * N Compressed data invalid - * @var int * @cvalue ZIP_ER_COMPRESSED_DATA */ - public const ER_COMPRESSED_DATA = UNKNOWN; + public const int ER_COMPRESSED_DATA = UNKNOWN; #endif #ifdef ZIP_ER_CANCELLED /** * N Operation cancelled - * @var int * @cvalue ZIP_ER_CANCELLED */ - public const ER_CANCELLED = UNKNOWN; + public const int ER_CANCELLED = UNKNOWN; #endif /* since 1.10.0 */ #ifdef ZIP_ER_DATA_LENGTH /** * N Unexpected length of data - * @var int * @cvalue ZIP_ER_DATA_LENGTH */ - public const ER_DATA_LENGTH = UNKNOWN; + public const int ER_DATA_LENGTH = UNKNOWN; #endif #ifdef ZIP_ER_NOT_ALLOWED /** * Not allowed in torrentzip - * @var int * @cvalue ZIP_ER_NOT_ALLOWED */ - public const ER_NOT_ALLOWED = UNKNOWN; + public const int ER_NOT_ALLOWED = UNKNOWN; #endif #ifdef ZIP_AFL_RDONLY /** * read only -- cannot be cleared - * @var int * @cvalue ZIP_AFL_RDONLY */ - public const AFL_RDONLY = UNKNOWN; + public const int AFL_RDONLY = UNKNOWN; #endif #ifdef ZIP_AFL_IS_TORRENTZIP /** * current archive is torrentzipped - * @var int * @cvalue ZIP_AFL_IS_TORRENTZIP */ - public const AFL_IS_TORRENTZIP = UNKNOWN; + public const int AFL_IS_TORRENTZIP = UNKNOWN; #endif #ifdef ZIP_AFL_WANT_TORRENTZIP /** * write archive in torrentzip format - * @var int * @cvalue ZIP_AFL_WANT_TORRENTZIP */ - public const AFL_WANT_TORRENTZIP = UNKNOWN; + public const int AFL_WANT_TORRENTZIP = UNKNOWN; #endif #ifdef ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE /** * don't remove file if archive is empty - * @var int * @cvalue ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE */ - public const AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE = UNKNOWN; + public const int AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE = UNKNOWN; #endif #ifdef ZIP_OPSYS_DEFAULT /** - * @var int * @cvalue ZIP_OPSYS_DOS * @link ziparchive.constants.opsys */ - public const OPSYS_DOS = UNKNOWN; + public const int OPSYS_DOS = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_AMIGA * @link ziparchive.constants.opsys */ - public const OPSYS_AMIGA = UNKNOWN; + public const int OPSYS_AMIGA = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_OPENVMS * @link ziparchive.constants.opsys */ - public const OPSYS_OPENVMS = UNKNOWN; + public const int OPSYS_OPENVMS = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_UNIX * @link ziparchive.constants.opsys */ - public const OPSYS_UNIX = UNKNOWN; + public const int OPSYS_UNIX = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_VM_CMS * @link ziparchive.constants.opsys */ - public const OPSYS_VM_CMS = UNKNOWN; + public const int OPSYS_VM_CMS = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_ATARI_ST * @link ziparchive.constants.opsys */ - public const OPSYS_ATARI_ST = UNKNOWN; + public const int OPSYS_ATARI_ST = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_OS_2 * @link ziparchive.constants.opsys */ - public const OPSYS_OS_2 = UNKNOWN; + public const int OPSYS_OS_2 = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_MACINTOSH * @link ziparchive.constants.opsys */ - public const OPSYS_MACINTOSH = UNKNOWN; + public const int OPSYS_MACINTOSH = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_Z_SYSTEM * @link ziparchive.constants.opsys */ - public const OPSYS_Z_SYSTEM = UNKNOWN; + public const int OPSYS_Z_SYSTEM = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_CPM * @link ziparchive.constants.opsys */ - public const OPSYS_CPM = UNKNOWN; + public const int OPSYS_CPM = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_WINDOWS_NTFS * @link ziparchive.constants.opsys */ - public const OPSYS_WINDOWS_NTFS = UNKNOWN; + public const int OPSYS_WINDOWS_NTFS = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_MVS * @link ziparchive.constants.opsys */ - public const OPSYS_MVS = UNKNOWN; + public const int OPSYS_MVS = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_VSE * @link ziparchive.constants.opsys */ - public const OPSYS_VSE = UNKNOWN; + public const int OPSYS_VSE = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_ACORN_RISC * @link ziparchive.constants.opsys */ - public const OPSYS_ACORN_RISC = UNKNOWN; + public const int OPSYS_ACORN_RISC = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_VFAT * @link ziparchive.constants.opsys */ - public const OPSYS_VFAT = UNKNOWN; + public const int OPSYS_VFAT = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_ALTERNATE_MVS * @link ziparchive.constants.opsys */ - public const OPSYS_ALTERNATE_MVS = UNKNOWN; + public const int OPSYS_ALTERNATE_MVS = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_BEOS * @link ziparchive.constants.opsys */ - public const OPSYS_BEOS = UNKNOWN; + public const int OPSYS_BEOS = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_TANDEM * @link ziparchive.constants.opsys */ - public const OPSYS_TANDEM = UNKNOWN; + public const int OPSYS_TANDEM = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_OS_400 * @link ziparchive.constants.opsys */ - public const OPSYS_OS_400 = UNKNOWN; + public const int OPSYS_OS_400 = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_OS_X * @link ziparchive.constants.opsys */ - public const OPSYS_OS_X = UNKNOWN; + public const int OPSYS_OS_X = UNKNOWN; /** - * @var int * @cvalue ZIP_OPSYS_DEFAULT * @link ziparchive.constants.opsys */ - public const OPSYS_DEFAULT = UNKNOWN; + public const int OPSYS_DEFAULT = UNKNOWN; #endif /** - * @var int * @cvalue ZIP_EM_NONE */ - public const EM_NONE = UNKNOWN; + public const int EM_NONE = UNKNOWN; /** - * @var int * @cvalue ZIP_EM_TRAD_PKWARE */ - public const EM_TRAD_PKWARE = UNKNOWN; + public const int EM_TRAD_PKWARE = UNKNOWN; #ifdef HAVE_ENCRYPTION /** - * @var int * @cvalue ZIP_EM_AES_128 */ - public const EM_AES_128 = UNKNOWN; + public const int EM_AES_128 = UNKNOWN; /** - * @var int * @cvalue ZIP_EM_AES_192 */ - public const EM_AES_192 = UNKNOWN; + public const int EM_AES_192 = UNKNOWN; /** - * @var int * @cvalue ZIP_EM_AES_256 */ - public const EM_AES_256 = UNKNOWN; + public const int EM_AES_256 = UNKNOWN; #endif /** - * @var int * @cvalue ZIP_EM_UNKNOWN */ - public const EM_UNKNOWN = UNKNOWN; + public const int EM_UNKNOWN = UNKNOWN; /** - * @var string * @cvalue LIBZIP_VERSION_STR */ - public const LIBZIP_VERSION = UNKNOWN; + public const string LIBZIP_VERSION = UNKNOWN; /** - * @var int * @cvalue ZIP_LENGTH_TO_END */ - public const LENGTH_TO_END = UNKNOWN; + public const int LENGTH_TO_END = UNKNOWN; /* since 1.10.1 */ #ifdef ZIP_LENGTH_UNCHECKED /** - * @var int * @cvalue ZIP_LENGTH_UNCHECKED */ - public const LENGTH_UNCHECKED = UNKNOWN; + public const int LENGTH_UNCHECKED = UNKNOWN; #endif /** @readonly */ diff --git a/ext/zip/php_zip_arginfo.h b/ext/zip/php_zip_arginfo.h index b17c696de8ef..c5869c5cc0f1 100644 --- a/ext/zip/php_zip_arginfo.h +++ b/ext/zip/php_zip_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: ac1969b19efd54bb9a2b9e2f228e66f4d22000b1 */ + * Stub hash: 95564c667a51a548f5d43025c90546b991970ddd */ ZEND_BEGIN_ARG_INFO_EX(arginfo_zip_open, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) @@ -511,210 +511,210 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_CREATE_value; ZVAL_LONG(&const_CREATE_value, ZIP_CREATE); zend_string *const_CREATE_name = zend_string_init_interned("CREATE", sizeof("CREATE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CREATE_name, &const_CREATE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CREATE_name, &const_CREATE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CREATE_name); zval const_EXCL_value; ZVAL_LONG(&const_EXCL_value, ZIP_EXCL); zend_string *const_EXCL_name = zend_string_init_interned("EXCL", sizeof("EXCL") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_EXCL_name, &const_EXCL_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_EXCL_name, &const_EXCL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_EXCL_name); zval const_CHECKCONS_value; ZVAL_LONG(&const_CHECKCONS_value, ZIP_CHECKCONS); zend_string *const_CHECKCONS_name = zend_string_init_interned("CHECKCONS", sizeof("CHECKCONS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CHECKCONS_name, &const_CHECKCONS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CHECKCONS_name, &const_CHECKCONS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CHECKCONS_name); zval const_OVERWRITE_value; ZVAL_LONG(&const_OVERWRITE_value, ZIP_OVERWRITE); zend_string *const_OVERWRITE_name = zend_string_init_interned("OVERWRITE", sizeof("OVERWRITE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OVERWRITE_name, &const_OVERWRITE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OVERWRITE_name, &const_OVERWRITE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OVERWRITE_name); #if defined(ZIP_RDONLY) zval const_RDONLY_value; ZVAL_LONG(&const_RDONLY_value, ZIP_RDONLY); zend_string *const_RDONLY_name = zend_string_init_interned("RDONLY", sizeof("RDONLY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_RDONLY_name, &const_RDONLY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_RDONLY_name, &const_RDONLY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_RDONLY_name); #endif zval const_FL_NOCASE_value; ZVAL_LONG(&const_FL_NOCASE_value, ZIP_FL_NOCASE); zend_string *const_FL_NOCASE_name = zend_string_init_interned("FL_NOCASE", sizeof("FL_NOCASE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_NOCASE_name, &const_FL_NOCASE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_NOCASE_name, &const_FL_NOCASE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_NOCASE_name); zval const_FL_NODIR_value; ZVAL_LONG(&const_FL_NODIR_value, ZIP_FL_NODIR); zend_string *const_FL_NODIR_name = zend_string_init_interned("FL_NODIR", sizeof("FL_NODIR") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_NODIR_name, &const_FL_NODIR_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_NODIR_name, &const_FL_NODIR_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_NODIR_name); zval const_FL_COMPRESSED_value; ZVAL_LONG(&const_FL_COMPRESSED_value, ZIP_FL_COMPRESSED); zend_string *const_FL_COMPRESSED_name = zend_string_init_interned("FL_COMPRESSED", sizeof("FL_COMPRESSED") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_COMPRESSED_name, &const_FL_COMPRESSED_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_COMPRESSED_name, &const_FL_COMPRESSED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_COMPRESSED_name); zval const_FL_UNCHANGED_value; ZVAL_LONG(&const_FL_UNCHANGED_value, ZIP_FL_UNCHANGED); zend_string *const_FL_UNCHANGED_name = zend_string_init_interned("FL_UNCHANGED", sizeof("FL_UNCHANGED") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_UNCHANGED_name, &const_FL_UNCHANGED_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_UNCHANGED_name, &const_FL_UNCHANGED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_UNCHANGED_name); #if defined(ZIP_FL_RECOMPRESS) zval const_FL_RECOMPRESS_value; ZVAL_LONG(&const_FL_RECOMPRESS_value, ZIP_FL_RECOMPRESS); zend_string *const_FL_RECOMPRESS_name = zend_string_init_interned("FL_RECOMPRESS", sizeof("FL_RECOMPRESS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_RECOMPRESS_name, &const_FL_RECOMPRESS_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_RECOMPRESS_name, &const_FL_RECOMPRESS_value, ZEND_ACC_PUBLIC|ZEND_ACC_DEPRECATED, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_RECOMPRESS_name); #endif zval const_FL_ENCRYPTED_value; ZVAL_LONG(&const_FL_ENCRYPTED_value, ZIP_FL_ENCRYPTED); zend_string *const_FL_ENCRYPTED_name = zend_string_init_interned("FL_ENCRYPTED", sizeof("FL_ENCRYPTED") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_ENCRYPTED_name, &const_FL_ENCRYPTED_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_ENCRYPTED_name, &const_FL_ENCRYPTED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_ENCRYPTED_name); zval const_FL_OVERWRITE_value; ZVAL_LONG(&const_FL_OVERWRITE_value, ZIP_FL_OVERWRITE); zend_string *const_FL_OVERWRITE_name = zend_string_init_interned("FL_OVERWRITE", sizeof("FL_OVERWRITE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_OVERWRITE_name, &const_FL_OVERWRITE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_OVERWRITE_name, &const_FL_OVERWRITE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_OVERWRITE_name); zval const_FL_LOCAL_value; ZVAL_LONG(&const_FL_LOCAL_value, ZIP_FL_LOCAL); zend_string *const_FL_LOCAL_name = zend_string_init_interned("FL_LOCAL", sizeof("FL_LOCAL") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_LOCAL_name, &const_FL_LOCAL_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_LOCAL_name, &const_FL_LOCAL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_LOCAL_name); zval const_FL_CENTRAL_value; ZVAL_LONG(&const_FL_CENTRAL_value, ZIP_FL_CENTRAL); zend_string *const_FL_CENTRAL_name = zend_string_init_interned("FL_CENTRAL", sizeof("FL_CENTRAL") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_CENTRAL_name, &const_FL_CENTRAL_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_CENTRAL_name, &const_FL_CENTRAL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_CENTRAL_name); zval const_FL_ENC_GUESS_value; ZVAL_LONG(&const_FL_ENC_GUESS_value, ZIP_FL_ENC_GUESS); zend_string *const_FL_ENC_GUESS_name = zend_string_init_interned("FL_ENC_GUESS", sizeof("FL_ENC_GUESS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_ENC_GUESS_name, &const_FL_ENC_GUESS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_ENC_GUESS_name, &const_FL_ENC_GUESS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_ENC_GUESS_name); zval const_FL_ENC_RAW_value; ZVAL_LONG(&const_FL_ENC_RAW_value, ZIP_FL_ENC_RAW); zend_string *const_FL_ENC_RAW_name = zend_string_init_interned("FL_ENC_RAW", sizeof("FL_ENC_RAW") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_ENC_RAW_name, &const_FL_ENC_RAW_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_ENC_RAW_name, &const_FL_ENC_RAW_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_ENC_RAW_name); zval const_FL_ENC_STRICT_value; ZVAL_LONG(&const_FL_ENC_STRICT_value, ZIP_FL_ENC_STRICT); zend_string *const_FL_ENC_STRICT_name = zend_string_init_interned("FL_ENC_STRICT", sizeof("FL_ENC_STRICT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_ENC_STRICT_name, &const_FL_ENC_STRICT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_ENC_STRICT_name, &const_FL_ENC_STRICT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_ENC_STRICT_name); zval const_FL_ENC_UTF_8_value; ZVAL_LONG(&const_FL_ENC_UTF_8_value, ZIP_FL_ENC_UTF_8); zend_string *const_FL_ENC_UTF_8_name = zend_string_init_interned("FL_ENC_UTF_8", sizeof("FL_ENC_UTF_8") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_ENC_UTF_8_name, &const_FL_ENC_UTF_8_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_ENC_UTF_8_name, &const_FL_ENC_UTF_8_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_ENC_UTF_8_name); zval const_FL_ENC_CP437_value; ZVAL_LONG(&const_FL_ENC_CP437_value, ZIP_FL_ENC_CP437); zend_string *const_FL_ENC_CP437_name = zend_string_init_interned("FL_ENC_CP437", sizeof("FL_ENC_CP437") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_ENC_CP437_name, &const_FL_ENC_CP437_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_ENC_CP437_name, &const_FL_ENC_CP437_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_ENC_CP437_name); zval const_FL_OPEN_FILE_NOW_value; ZVAL_LONG(&const_FL_OPEN_FILE_NOW_value, ZIP_FL_OPEN_FILE_NOW); zend_string *const_FL_OPEN_FILE_NOW_name = zend_string_init_interned("FL_OPEN_FILE_NOW", sizeof("FL_OPEN_FILE_NOW") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_FL_OPEN_FILE_NOW_name, &const_FL_OPEN_FILE_NOW_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_FL_OPEN_FILE_NOW_name, &const_FL_OPEN_FILE_NOW_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_FL_OPEN_FILE_NOW_name); zval const_CM_DEFAULT_value; ZVAL_LONG(&const_CM_DEFAULT_value, ZIP_CM_DEFAULT); zend_string *const_CM_DEFAULT_name = zend_string_init_interned("CM_DEFAULT", sizeof("CM_DEFAULT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_DEFAULT_name, &const_CM_DEFAULT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_DEFAULT_name, &const_CM_DEFAULT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_DEFAULT_name); zval const_CM_STORE_value; ZVAL_LONG(&const_CM_STORE_value, ZIP_CM_STORE); zend_string *const_CM_STORE_name = zend_string_init_interned("CM_STORE", sizeof("CM_STORE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_STORE_name, &const_CM_STORE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_STORE_name, &const_CM_STORE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_STORE_name); zval const_CM_SHRINK_value; ZVAL_LONG(&const_CM_SHRINK_value, ZIP_CM_SHRINK); zend_string *const_CM_SHRINK_name = zend_string_init_interned("CM_SHRINK", sizeof("CM_SHRINK") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_SHRINK_name, &const_CM_SHRINK_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_SHRINK_name, &const_CM_SHRINK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_SHRINK_name); zval const_CM_REDUCE_1_value; ZVAL_LONG(&const_CM_REDUCE_1_value, ZIP_CM_REDUCE_1); zend_string *const_CM_REDUCE_1_name = zend_string_init_interned("CM_REDUCE_1", sizeof("CM_REDUCE_1") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_REDUCE_1_name, &const_CM_REDUCE_1_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_REDUCE_1_name, &const_CM_REDUCE_1_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_REDUCE_1_name); zval const_CM_REDUCE_2_value; ZVAL_LONG(&const_CM_REDUCE_2_value, ZIP_CM_REDUCE_2); zend_string *const_CM_REDUCE_2_name = zend_string_init_interned("CM_REDUCE_2", sizeof("CM_REDUCE_2") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_REDUCE_2_name, &const_CM_REDUCE_2_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_REDUCE_2_name, &const_CM_REDUCE_2_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_REDUCE_2_name); zval const_CM_REDUCE_3_value; ZVAL_LONG(&const_CM_REDUCE_3_value, ZIP_CM_REDUCE_3); zend_string *const_CM_REDUCE_3_name = zend_string_init_interned("CM_REDUCE_3", sizeof("CM_REDUCE_3") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_REDUCE_3_name, &const_CM_REDUCE_3_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_REDUCE_3_name, &const_CM_REDUCE_3_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_REDUCE_3_name); zval const_CM_REDUCE_4_value; ZVAL_LONG(&const_CM_REDUCE_4_value, ZIP_CM_REDUCE_4); zend_string *const_CM_REDUCE_4_name = zend_string_init_interned("CM_REDUCE_4", sizeof("CM_REDUCE_4") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_REDUCE_4_name, &const_CM_REDUCE_4_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_REDUCE_4_name, &const_CM_REDUCE_4_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_REDUCE_4_name); zval const_CM_IMPLODE_value; ZVAL_LONG(&const_CM_IMPLODE_value, ZIP_CM_IMPLODE); zend_string *const_CM_IMPLODE_name = zend_string_init_interned("CM_IMPLODE", sizeof("CM_IMPLODE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_IMPLODE_name, &const_CM_IMPLODE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_IMPLODE_name, &const_CM_IMPLODE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_IMPLODE_name); zval const_CM_DEFLATE_value; ZVAL_LONG(&const_CM_DEFLATE_value, ZIP_CM_DEFLATE); zend_string *const_CM_DEFLATE_name = zend_string_init_interned("CM_DEFLATE", sizeof("CM_DEFLATE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_DEFLATE_name, &const_CM_DEFLATE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_DEFLATE_name, &const_CM_DEFLATE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_DEFLATE_name); zval const_CM_DEFLATE64_value; ZVAL_LONG(&const_CM_DEFLATE64_value, ZIP_CM_DEFLATE64); zend_string *const_CM_DEFLATE64_name = zend_string_init_interned("CM_DEFLATE64", sizeof("CM_DEFLATE64") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_DEFLATE64_name, &const_CM_DEFLATE64_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_DEFLATE64_name, &const_CM_DEFLATE64_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_DEFLATE64_name); zval const_CM_PKWARE_IMPLODE_value; ZVAL_LONG(&const_CM_PKWARE_IMPLODE_value, ZIP_CM_PKWARE_IMPLODE); zend_string *const_CM_PKWARE_IMPLODE_name = zend_string_init_interned("CM_PKWARE_IMPLODE", sizeof("CM_PKWARE_IMPLODE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_PKWARE_IMPLODE_name, &const_CM_PKWARE_IMPLODE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_PKWARE_IMPLODE_name, &const_CM_PKWARE_IMPLODE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_PKWARE_IMPLODE_name); zval const_CM_BZIP2_value; ZVAL_LONG(&const_CM_BZIP2_value, ZIP_CM_BZIP2); zend_string *const_CM_BZIP2_name = zend_string_init_interned("CM_BZIP2", sizeof("CM_BZIP2") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_BZIP2_name, &const_CM_BZIP2_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_BZIP2_name, &const_CM_BZIP2_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_BZIP2_name); zval const_CM_LZMA_value; ZVAL_LONG(&const_CM_LZMA_value, ZIP_CM_LZMA); zend_string *const_CM_LZMA_name = zend_string_init_interned("CM_LZMA", sizeof("CM_LZMA") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_LZMA_name, &const_CM_LZMA_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_LZMA_name, &const_CM_LZMA_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_LZMA_name); #if defined(ZIP_CM_LZMA2) zval const_CM_LZMA2_value; ZVAL_LONG(&const_CM_LZMA2_value, ZIP_CM_LZMA2); zend_string *const_CM_LZMA2_name = zend_string_init_interned("CM_LZMA2", sizeof("CM_LZMA2") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_LZMA2_name, &const_CM_LZMA2_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_LZMA2_name, &const_CM_LZMA2_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_LZMA2_name); #endif #if defined(ZIP_CM_ZSTD) @@ -722,7 +722,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_CM_ZSTD_value; ZVAL_LONG(&const_CM_ZSTD_value, ZIP_CM_ZSTD); zend_string *const_CM_ZSTD_name = zend_string_init_interned("CM_ZSTD", sizeof("CM_ZSTD") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_ZSTD_name, &const_CM_ZSTD_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_ZSTD_name, &const_CM_ZSTD_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_ZSTD_name); #endif #if defined(ZIP_CM_XZ) @@ -730,207 +730,207 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_CM_XZ_value; ZVAL_LONG(&const_CM_XZ_value, ZIP_CM_XZ); zend_string *const_CM_XZ_name = zend_string_init_interned("CM_XZ", sizeof("CM_XZ") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_XZ_name, &const_CM_XZ_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_XZ_name, &const_CM_XZ_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_XZ_name); #endif zval const_CM_TERSE_value; ZVAL_LONG(&const_CM_TERSE_value, ZIP_CM_TERSE); zend_string *const_CM_TERSE_name = zend_string_init_interned("CM_TERSE", sizeof("CM_TERSE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_TERSE_name, &const_CM_TERSE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_TERSE_name, &const_CM_TERSE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_TERSE_name); zval const_CM_LZ77_value; ZVAL_LONG(&const_CM_LZ77_value, ZIP_CM_LZ77); zend_string *const_CM_LZ77_name = zend_string_init_interned("CM_LZ77", sizeof("CM_LZ77") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_LZ77_name, &const_CM_LZ77_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_LZ77_name, &const_CM_LZ77_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_LZ77_name); zval const_CM_WAVPACK_value; ZVAL_LONG(&const_CM_WAVPACK_value, ZIP_CM_WAVPACK); zend_string *const_CM_WAVPACK_name = zend_string_init_interned("CM_WAVPACK", sizeof("CM_WAVPACK") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_WAVPACK_name, &const_CM_WAVPACK_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_WAVPACK_name, &const_CM_WAVPACK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_WAVPACK_name); zval const_CM_PPMD_value; ZVAL_LONG(&const_CM_PPMD_value, ZIP_CM_PPMD); zend_string *const_CM_PPMD_name = zend_string_init_interned("CM_PPMD", sizeof("CM_PPMD") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_CM_PPMD_name, &const_CM_PPMD_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_CM_PPMD_name, &const_CM_PPMD_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_CM_PPMD_name); zval const_ER_OK_value; ZVAL_LONG(&const_ER_OK_value, ZIP_ER_OK); zend_string *const_ER_OK_name = zend_string_init_interned("ER_OK", sizeof("ER_OK") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_OK_name, &const_ER_OK_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_OK_name, &const_ER_OK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_OK_name); zval const_ER_MULTIDISK_value; ZVAL_LONG(&const_ER_MULTIDISK_value, ZIP_ER_MULTIDISK); zend_string *const_ER_MULTIDISK_name = zend_string_init_interned("ER_MULTIDISK", sizeof("ER_MULTIDISK") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_MULTIDISK_name, &const_ER_MULTIDISK_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_MULTIDISK_name, &const_ER_MULTIDISK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_MULTIDISK_name); zval const_ER_RENAME_value; ZVAL_LONG(&const_ER_RENAME_value, ZIP_ER_RENAME); zend_string *const_ER_RENAME_name = zend_string_init_interned("ER_RENAME", sizeof("ER_RENAME") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_RENAME_name, &const_ER_RENAME_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_RENAME_name, &const_ER_RENAME_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_RENAME_name); zval const_ER_CLOSE_value; ZVAL_LONG(&const_ER_CLOSE_value, ZIP_ER_CLOSE); zend_string *const_ER_CLOSE_name = zend_string_init_interned("ER_CLOSE", sizeof("ER_CLOSE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_CLOSE_name, &const_ER_CLOSE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_CLOSE_name, &const_ER_CLOSE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_CLOSE_name); zval const_ER_SEEK_value; ZVAL_LONG(&const_ER_SEEK_value, ZIP_ER_SEEK); zend_string *const_ER_SEEK_name = zend_string_init_interned("ER_SEEK", sizeof("ER_SEEK") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_SEEK_name, &const_ER_SEEK_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_SEEK_name, &const_ER_SEEK_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_SEEK_name); zval const_ER_READ_value; ZVAL_LONG(&const_ER_READ_value, ZIP_ER_READ); zend_string *const_ER_READ_name = zend_string_init_interned("ER_READ", sizeof("ER_READ") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_READ_name, &const_ER_READ_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_READ_name, &const_ER_READ_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_READ_name); zval const_ER_WRITE_value; ZVAL_LONG(&const_ER_WRITE_value, ZIP_ER_WRITE); zend_string *const_ER_WRITE_name = zend_string_init_interned("ER_WRITE", sizeof("ER_WRITE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_WRITE_name, &const_ER_WRITE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_WRITE_name, &const_ER_WRITE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_WRITE_name); zval const_ER_CRC_value; ZVAL_LONG(&const_ER_CRC_value, ZIP_ER_CRC); zend_string *const_ER_CRC_name = zend_string_init_interned("ER_CRC", sizeof("ER_CRC") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_CRC_name, &const_ER_CRC_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_CRC_name, &const_ER_CRC_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_CRC_name); zval const_ER_ZIPCLOSED_value; ZVAL_LONG(&const_ER_ZIPCLOSED_value, ZIP_ER_ZIPCLOSED); zend_string *const_ER_ZIPCLOSED_name = zend_string_init_interned("ER_ZIPCLOSED", sizeof("ER_ZIPCLOSED") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_ZIPCLOSED_name, &const_ER_ZIPCLOSED_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_ZIPCLOSED_name, &const_ER_ZIPCLOSED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_ZIPCLOSED_name); zval const_ER_NOENT_value; ZVAL_LONG(&const_ER_NOENT_value, ZIP_ER_NOENT); zend_string *const_ER_NOENT_name = zend_string_init_interned("ER_NOENT", sizeof("ER_NOENT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_NOENT_name, &const_ER_NOENT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_NOENT_name, &const_ER_NOENT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_NOENT_name); zval const_ER_EXISTS_value; ZVAL_LONG(&const_ER_EXISTS_value, ZIP_ER_EXISTS); zend_string *const_ER_EXISTS_name = zend_string_init_interned("ER_EXISTS", sizeof("ER_EXISTS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_EXISTS_name, &const_ER_EXISTS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_EXISTS_name, &const_ER_EXISTS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_EXISTS_name); zval const_ER_OPEN_value; ZVAL_LONG(&const_ER_OPEN_value, ZIP_ER_OPEN); zend_string *const_ER_OPEN_name = zend_string_init_interned("ER_OPEN", sizeof("ER_OPEN") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_OPEN_name, &const_ER_OPEN_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_OPEN_name, &const_ER_OPEN_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_OPEN_name); zval const_ER_TMPOPEN_value; ZVAL_LONG(&const_ER_TMPOPEN_value, ZIP_ER_TMPOPEN); zend_string *const_ER_TMPOPEN_name = zend_string_init_interned("ER_TMPOPEN", sizeof("ER_TMPOPEN") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_TMPOPEN_name, &const_ER_TMPOPEN_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_TMPOPEN_name, &const_ER_TMPOPEN_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_TMPOPEN_name); zval const_ER_ZLIB_value; ZVAL_LONG(&const_ER_ZLIB_value, ZIP_ER_ZLIB); zend_string *const_ER_ZLIB_name = zend_string_init_interned("ER_ZLIB", sizeof("ER_ZLIB") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_ZLIB_name, &const_ER_ZLIB_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_ZLIB_name, &const_ER_ZLIB_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_ZLIB_name); zval const_ER_MEMORY_value; ZVAL_LONG(&const_ER_MEMORY_value, ZIP_ER_MEMORY); zend_string *const_ER_MEMORY_name = zend_string_init_interned("ER_MEMORY", sizeof("ER_MEMORY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_MEMORY_name, &const_ER_MEMORY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_MEMORY_name, &const_ER_MEMORY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_MEMORY_name); zval const_ER_CHANGED_value; ZVAL_LONG(&const_ER_CHANGED_value, ZIP_ER_CHANGED); zend_string *const_ER_CHANGED_name = zend_string_init_interned("ER_CHANGED", sizeof("ER_CHANGED") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_CHANGED_name, &const_ER_CHANGED_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_CHANGED_name, &const_ER_CHANGED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_CHANGED_name); zval const_ER_COMPNOTSUPP_value; ZVAL_LONG(&const_ER_COMPNOTSUPP_value, ZIP_ER_COMPNOTSUPP); zend_string *const_ER_COMPNOTSUPP_name = zend_string_init_interned("ER_COMPNOTSUPP", sizeof("ER_COMPNOTSUPP") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_COMPNOTSUPP_name, &const_ER_COMPNOTSUPP_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_COMPNOTSUPP_name, &const_ER_COMPNOTSUPP_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_COMPNOTSUPP_name); zval const_ER_EOF_value; ZVAL_LONG(&const_ER_EOF_value, ZIP_ER_EOF); zend_string *const_ER_EOF_name = zend_string_init_interned("ER_EOF", sizeof("ER_EOF") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_EOF_name, &const_ER_EOF_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_EOF_name, &const_ER_EOF_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_EOF_name); zval const_ER_INVAL_value; ZVAL_LONG(&const_ER_INVAL_value, ZIP_ER_INVAL); zend_string *const_ER_INVAL_name = zend_string_init_interned("ER_INVAL", sizeof("ER_INVAL") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_INVAL_name, &const_ER_INVAL_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_INVAL_name, &const_ER_INVAL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_INVAL_name); zval const_ER_NOZIP_value; ZVAL_LONG(&const_ER_NOZIP_value, ZIP_ER_NOZIP); zend_string *const_ER_NOZIP_name = zend_string_init_interned("ER_NOZIP", sizeof("ER_NOZIP") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_NOZIP_name, &const_ER_NOZIP_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_NOZIP_name, &const_ER_NOZIP_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_NOZIP_name); zval const_ER_INTERNAL_value; ZVAL_LONG(&const_ER_INTERNAL_value, ZIP_ER_INTERNAL); zend_string *const_ER_INTERNAL_name = zend_string_init_interned("ER_INTERNAL", sizeof("ER_INTERNAL") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_INTERNAL_name, &const_ER_INTERNAL_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_INTERNAL_name, &const_ER_INTERNAL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_INTERNAL_name); zval const_ER_INCONS_value; ZVAL_LONG(&const_ER_INCONS_value, ZIP_ER_INCONS); zend_string *const_ER_INCONS_name = zend_string_init_interned("ER_INCONS", sizeof("ER_INCONS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_INCONS_name, &const_ER_INCONS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_INCONS_name, &const_ER_INCONS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_INCONS_name); zval const_ER_REMOVE_value; ZVAL_LONG(&const_ER_REMOVE_value, ZIP_ER_REMOVE); zend_string *const_ER_REMOVE_name = zend_string_init_interned("ER_REMOVE", sizeof("ER_REMOVE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_REMOVE_name, &const_ER_REMOVE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_REMOVE_name, &const_ER_REMOVE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_REMOVE_name); zval const_ER_DELETED_value; ZVAL_LONG(&const_ER_DELETED_value, ZIP_ER_DELETED); zend_string *const_ER_DELETED_name = zend_string_init_interned("ER_DELETED", sizeof("ER_DELETED") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_DELETED_name, &const_ER_DELETED_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_DELETED_name, &const_ER_DELETED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_DELETED_name); zval const_ER_ENCRNOTSUPP_value; ZVAL_LONG(&const_ER_ENCRNOTSUPP_value, ZIP_ER_ENCRNOTSUPP); zend_string *const_ER_ENCRNOTSUPP_name = zend_string_init_interned("ER_ENCRNOTSUPP", sizeof("ER_ENCRNOTSUPP") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_ENCRNOTSUPP_name, &const_ER_ENCRNOTSUPP_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_ENCRNOTSUPP_name, &const_ER_ENCRNOTSUPP_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_ENCRNOTSUPP_name); zval const_ER_RDONLY_value; ZVAL_LONG(&const_ER_RDONLY_value, ZIP_ER_RDONLY); zend_string *const_ER_RDONLY_name = zend_string_init_interned("ER_RDONLY", sizeof("ER_RDONLY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_RDONLY_name, &const_ER_RDONLY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_RDONLY_name, &const_ER_RDONLY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_RDONLY_name); zval const_ER_NOPASSWD_value; ZVAL_LONG(&const_ER_NOPASSWD_value, ZIP_ER_NOPASSWD); zend_string *const_ER_NOPASSWD_name = zend_string_init_interned("ER_NOPASSWD", sizeof("ER_NOPASSWD") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_NOPASSWD_name, &const_ER_NOPASSWD_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_NOPASSWD_name, &const_ER_NOPASSWD_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_NOPASSWD_name); zval const_ER_WRONGPASSWD_value; ZVAL_LONG(&const_ER_WRONGPASSWD_value, ZIP_ER_WRONGPASSWD); zend_string *const_ER_WRONGPASSWD_name = zend_string_init_interned("ER_WRONGPASSWD", sizeof("ER_WRONGPASSWD") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_WRONGPASSWD_name, &const_ER_WRONGPASSWD_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_WRONGPASSWD_name, &const_ER_WRONGPASSWD_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_WRONGPASSWD_name); #if defined(ZIP_ER_OPNOTSUPP) zval const_ER_OPNOTSUPP_value; ZVAL_LONG(&const_ER_OPNOTSUPP_value, ZIP_ER_OPNOTSUPP); zend_string *const_ER_OPNOTSUPP_name = zend_string_init_interned("ER_OPNOTSUPP", sizeof("ER_OPNOTSUPP") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_OPNOTSUPP_name, &const_ER_OPNOTSUPP_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_OPNOTSUPP_name, &const_ER_OPNOTSUPP_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_OPNOTSUPP_name); #endif #if defined(ZIP_ER_INUSE) @@ -938,7 +938,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_ER_INUSE_value; ZVAL_LONG(&const_ER_INUSE_value, ZIP_ER_INUSE); zend_string *const_ER_INUSE_name = zend_string_init_interned("ER_INUSE", sizeof("ER_INUSE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_INUSE_name, &const_ER_INUSE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_INUSE_name, &const_ER_INUSE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_INUSE_name); #endif #if defined(ZIP_ER_TELL) @@ -946,7 +946,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_ER_TELL_value; ZVAL_LONG(&const_ER_TELL_value, ZIP_ER_TELL); zend_string *const_ER_TELL_name = zend_string_init_interned("ER_TELL", sizeof("ER_TELL") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_TELL_name, &const_ER_TELL_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_TELL_name, &const_ER_TELL_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_TELL_name); #endif #if defined(ZIP_ER_COMPRESSED_DATA) @@ -954,7 +954,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_ER_COMPRESSED_DATA_value; ZVAL_LONG(&const_ER_COMPRESSED_DATA_value, ZIP_ER_COMPRESSED_DATA); zend_string *const_ER_COMPRESSED_DATA_name = zend_string_init_interned("ER_COMPRESSED_DATA", sizeof("ER_COMPRESSED_DATA") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_COMPRESSED_DATA_name, &const_ER_COMPRESSED_DATA_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_COMPRESSED_DATA_name, &const_ER_COMPRESSED_DATA_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_COMPRESSED_DATA_name); #endif #if defined(ZIP_ER_CANCELLED) @@ -962,7 +962,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_ER_CANCELLED_value; ZVAL_LONG(&const_ER_CANCELLED_value, ZIP_ER_CANCELLED); zend_string *const_ER_CANCELLED_name = zend_string_init_interned("ER_CANCELLED", sizeof("ER_CANCELLED") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_CANCELLED_name, &const_ER_CANCELLED_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_CANCELLED_name, &const_ER_CANCELLED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_CANCELLED_name); #endif #if defined(ZIP_ER_DATA_LENGTH) @@ -970,7 +970,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_ER_DATA_LENGTH_value; ZVAL_LONG(&const_ER_DATA_LENGTH_value, ZIP_ER_DATA_LENGTH); zend_string *const_ER_DATA_LENGTH_name = zend_string_init_interned("ER_DATA_LENGTH", sizeof("ER_DATA_LENGTH") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_DATA_LENGTH_name, &const_ER_DATA_LENGTH_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_DATA_LENGTH_name, &const_ER_DATA_LENGTH_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_DATA_LENGTH_name); #endif #if defined(ZIP_ER_NOT_ALLOWED) @@ -978,7 +978,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_ER_NOT_ALLOWED_value; ZVAL_LONG(&const_ER_NOT_ALLOWED_value, ZIP_ER_NOT_ALLOWED); zend_string *const_ER_NOT_ALLOWED_name = zend_string_init_interned("ER_NOT_ALLOWED", sizeof("ER_NOT_ALLOWED") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_ER_NOT_ALLOWED_name, &const_ER_NOT_ALLOWED_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_ER_NOT_ALLOWED_name, &const_ER_NOT_ALLOWED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_ER_NOT_ALLOWED_name); #endif #if defined(ZIP_AFL_RDONLY) @@ -986,7 +986,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_AFL_RDONLY_value; ZVAL_LONG(&const_AFL_RDONLY_value, ZIP_AFL_RDONLY); zend_string *const_AFL_RDONLY_name = zend_string_init_interned("AFL_RDONLY", sizeof("AFL_RDONLY") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_AFL_RDONLY_name, &const_AFL_RDONLY_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_AFL_RDONLY_name, &const_AFL_RDONLY_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_AFL_RDONLY_name); #endif #if defined(ZIP_AFL_IS_TORRENTZIP) @@ -994,7 +994,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_AFL_IS_TORRENTZIP_value; ZVAL_LONG(&const_AFL_IS_TORRENTZIP_value, ZIP_AFL_IS_TORRENTZIP); zend_string *const_AFL_IS_TORRENTZIP_name = zend_string_init_interned("AFL_IS_TORRENTZIP", sizeof("AFL_IS_TORRENTZIP") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_AFL_IS_TORRENTZIP_name, &const_AFL_IS_TORRENTZIP_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_AFL_IS_TORRENTZIP_name, &const_AFL_IS_TORRENTZIP_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_AFL_IS_TORRENTZIP_name); #endif #if defined(ZIP_AFL_WANT_TORRENTZIP) @@ -1002,7 +1002,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_AFL_WANT_TORRENTZIP_value; ZVAL_LONG(&const_AFL_WANT_TORRENTZIP_value, ZIP_AFL_WANT_TORRENTZIP); zend_string *const_AFL_WANT_TORRENTZIP_name = zend_string_init_interned("AFL_WANT_TORRENTZIP", sizeof("AFL_WANT_TORRENTZIP") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_AFL_WANT_TORRENTZIP_name, &const_AFL_WANT_TORRENTZIP_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_AFL_WANT_TORRENTZIP_name, &const_AFL_WANT_TORRENTZIP_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_AFL_WANT_TORRENTZIP_name); #endif #if defined(ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE) @@ -1010,7 +1010,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE_value; ZVAL_LONG(&const_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE_value, ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE); zend_string *const_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE_name = zend_string_init_interned("AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE", sizeof("AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE_name, &const_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE_name, &const_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1018,7 +1018,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_DOS_value; ZVAL_LONG(&const_OPSYS_DOS_value, ZIP_OPSYS_DOS); zend_string *const_OPSYS_DOS_name = zend_string_init_interned("OPSYS_DOS", sizeof("OPSYS_DOS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_DOS_name, &const_OPSYS_DOS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_DOS_name, &const_OPSYS_DOS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_DOS_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1026,7 +1026,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_AMIGA_value; ZVAL_LONG(&const_OPSYS_AMIGA_value, ZIP_OPSYS_AMIGA); zend_string *const_OPSYS_AMIGA_name = zend_string_init_interned("OPSYS_AMIGA", sizeof("OPSYS_AMIGA") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_AMIGA_name, &const_OPSYS_AMIGA_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_AMIGA_name, &const_OPSYS_AMIGA_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_AMIGA_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1034,7 +1034,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_OPENVMS_value; ZVAL_LONG(&const_OPSYS_OPENVMS_value, ZIP_OPSYS_OPENVMS); zend_string *const_OPSYS_OPENVMS_name = zend_string_init_interned("OPSYS_OPENVMS", sizeof("OPSYS_OPENVMS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_OPENVMS_name, &const_OPSYS_OPENVMS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_OPENVMS_name, &const_OPSYS_OPENVMS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_OPENVMS_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1042,7 +1042,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_UNIX_value; ZVAL_LONG(&const_OPSYS_UNIX_value, ZIP_OPSYS_UNIX); zend_string *const_OPSYS_UNIX_name = zend_string_init_interned("OPSYS_UNIX", sizeof("OPSYS_UNIX") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_UNIX_name, &const_OPSYS_UNIX_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_UNIX_name, &const_OPSYS_UNIX_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_UNIX_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1050,7 +1050,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_VM_CMS_value; ZVAL_LONG(&const_OPSYS_VM_CMS_value, ZIP_OPSYS_VM_CMS); zend_string *const_OPSYS_VM_CMS_name = zend_string_init_interned("OPSYS_VM_CMS", sizeof("OPSYS_VM_CMS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_VM_CMS_name, &const_OPSYS_VM_CMS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_VM_CMS_name, &const_OPSYS_VM_CMS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_VM_CMS_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1058,7 +1058,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_ATARI_ST_value; ZVAL_LONG(&const_OPSYS_ATARI_ST_value, ZIP_OPSYS_ATARI_ST); zend_string *const_OPSYS_ATARI_ST_name = zend_string_init_interned("OPSYS_ATARI_ST", sizeof("OPSYS_ATARI_ST") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_ATARI_ST_name, &const_OPSYS_ATARI_ST_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_ATARI_ST_name, &const_OPSYS_ATARI_ST_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_ATARI_ST_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1066,7 +1066,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_OS_2_value; ZVAL_LONG(&const_OPSYS_OS_2_value, ZIP_OPSYS_OS_2); zend_string *const_OPSYS_OS_2_name = zend_string_init_interned("OPSYS_OS_2", sizeof("OPSYS_OS_2") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_OS_2_name, &const_OPSYS_OS_2_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_OS_2_name, &const_OPSYS_OS_2_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_OS_2_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1074,7 +1074,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_MACINTOSH_value; ZVAL_LONG(&const_OPSYS_MACINTOSH_value, ZIP_OPSYS_MACINTOSH); zend_string *const_OPSYS_MACINTOSH_name = zend_string_init_interned("OPSYS_MACINTOSH", sizeof("OPSYS_MACINTOSH") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_MACINTOSH_name, &const_OPSYS_MACINTOSH_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_MACINTOSH_name, &const_OPSYS_MACINTOSH_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_MACINTOSH_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1082,7 +1082,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_Z_SYSTEM_value; ZVAL_LONG(&const_OPSYS_Z_SYSTEM_value, ZIP_OPSYS_Z_SYSTEM); zend_string *const_OPSYS_Z_SYSTEM_name = zend_string_init_interned("OPSYS_Z_SYSTEM", sizeof("OPSYS_Z_SYSTEM") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_Z_SYSTEM_name, &const_OPSYS_Z_SYSTEM_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_Z_SYSTEM_name, &const_OPSYS_Z_SYSTEM_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_Z_SYSTEM_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1090,7 +1090,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_CPM_value; ZVAL_LONG(&const_OPSYS_CPM_value, ZIP_OPSYS_CPM); zend_string *const_OPSYS_CPM_name = zend_string_init_interned("OPSYS_CPM", sizeof("OPSYS_CPM") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_CPM_name, &const_OPSYS_CPM_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_CPM_name, &const_OPSYS_CPM_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_CPM_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1098,7 +1098,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_WINDOWS_NTFS_value; ZVAL_LONG(&const_OPSYS_WINDOWS_NTFS_value, ZIP_OPSYS_WINDOWS_NTFS); zend_string *const_OPSYS_WINDOWS_NTFS_name = zend_string_init_interned("OPSYS_WINDOWS_NTFS", sizeof("OPSYS_WINDOWS_NTFS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_WINDOWS_NTFS_name, &const_OPSYS_WINDOWS_NTFS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_WINDOWS_NTFS_name, &const_OPSYS_WINDOWS_NTFS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_WINDOWS_NTFS_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1106,7 +1106,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_MVS_value; ZVAL_LONG(&const_OPSYS_MVS_value, ZIP_OPSYS_MVS); zend_string *const_OPSYS_MVS_name = zend_string_init_interned("OPSYS_MVS", sizeof("OPSYS_MVS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_MVS_name, &const_OPSYS_MVS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_MVS_name, &const_OPSYS_MVS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_MVS_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1114,7 +1114,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_VSE_value; ZVAL_LONG(&const_OPSYS_VSE_value, ZIP_OPSYS_VSE); zend_string *const_OPSYS_VSE_name = zend_string_init_interned("OPSYS_VSE", sizeof("OPSYS_VSE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_VSE_name, &const_OPSYS_VSE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_VSE_name, &const_OPSYS_VSE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_VSE_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1122,7 +1122,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_ACORN_RISC_value; ZVAL_LONG(&const_OPSYS_ACORN_RISC_value, ZIP_OPSYS_ACORN_RISC); zend_string *const_OPSYS_ACORN_RISC_name = zend_string_init_interned("OPSYS_ACORN_RISC", sizeof("OPSYS_ACORN_RISC") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_ACORN_RISC_name, &const_OPSYS_ACORN_RISC_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_ACORN_RISC_name, &const_OPSYS_ACORN_RISC_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_ACORN_RISC_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1130,7 +1130,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_VFAT_value; ZVAL_LONG(&const_OPSYS_VFAT_value, ZIP_OPSYS_VFAT); zend_string *const_OPSYS_VFAT_name = zend_string_init_interned("OPSYS_VFAT", sizeof("OPSYS_VFAT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_VFAT_name, &const_OPSYS_VFAT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_VFAT_name, &const_OPSYS_VFAT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_VFAT_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1138,7 +1138,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_ALTERNATE_MVS_value; ZVAL_LONG(&const_OPSYS_ALTERNATE_MVS_value, ZIP_OPSYS_ALTERNATE_MVS); zend_string *const_OPSYS_ALTERNATE_MVS_name = zend_string_init_interned("OPSYS_ALTERNATE_MVS", sizeof("OPSYS_ALTERNATE_MVS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_ALTERNATE_MVS_name, &const_OPSYS_ALTERNATE_MVS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_ALTERNATE_MVS_name, &const_OPSYS_ALTERNATE_MVS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_ALTERNATE_MVS_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1146,7 +1146,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_BEOS_value; ZVAL_LONG(&const_OPSYS_BEOS_value, ZIP_OPSYS_BEOS); zend_string *const_OPSYS_BEOS_name = zend_string_init_interned("OPSYS_BEOS", sizeof("OPSYS_BEOS") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_BEOS_name, &const_OPSYS_BEOS_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_BEOS_name, &const_OPSYS_BEOS_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_BEOS_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1154,7 +1154,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_TANDEM_value; ZVAL_LONG(&const_OPSYS_TANDEM_value, ZIP_OPSYS_TANDEM); zend_string *const_OPSYS_TANDEM_name = zend_string_init_interned("OPSYS_TANDEM", sizeof("OPSYS_TANDEM") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_TANDEM_name, &const_OPSYS_TANDEM_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_TANDEM_name, &const_OPSYS_TANDEM_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_TANDEM_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1162,7 +1162,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_OS_400_value; ZVAL_LONG(&const_OPSYS_OS_400_value, ZIP_OPSYS_OS_400); zend_string *const_OPSYS_OS_400_name = zend_string_init_interned("OPSYS_OS_400", sizeof("OPSYS_OS_400") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_OS_400_name, &const_OPSYS_OS_400_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_OS_400_name, &const_OPSYS_OS_400_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_OS_400_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1170,7 +1170,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_OS_X_value; ZVAL_LONG(&const_OPSYS_OS_X_value, ZIP_OPSYS_OS_X); zend_string *const_OPSYS_OS_X_name = zend_string_init_interned("OPSYS_OS_X", sizeof("OPSYS_OS_X") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_OS_X_name, &const_OPSYS_OS_X_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_OS_X_name, &const_OPSYS_OS_X_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_OS_X_name); #endif #if defined(ZIP_OPSYS_DEFAULT) @@ -1178,27 +1178,27 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_OPSYS_DEFAULT_value; ZVAL_LONG(&const_OPSYS_DEFAULT_value, ZIP_OPSYS_DEFAULT); zend_string *const_OPSYS_DEFAULT_name = zend_string_init_interned("OPSYS_DEFAULT", sizeof("OPSYS_DEFAULT") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_OPSYS_DEFAULT_name, &const_OPSYS_DEFAULT_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_OPSYS_DEFAULT_name, &const_OPSYS_DEFAULT_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_OPSYS_DEFAULT_name); #endif zval const_EM_NONE_value; ZVAL_LONG(&const_EM_NONE_value, ZIP_EM_NONE); zend_string *const_EM_NONE_name = zend_string_init_interned("EM_NONE", sizeof("EM_NONE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_EM_NONE_name, &const_EM_NONE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_EM_NONE_name, &const_EM_NONE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_EM_NONE_name); zval const_EM_TRAD_PKWARE_value; ZVAL_LONG(&const_EM_TRAD_PKWARE_value, ZIP_EM_TRAD_PKWARE); zend_string *const_EM_TRAD_PKWARE_name = zend_string_init_interned("EM_TRAD_PKWARE", sizeof("EM_TRAD_PKWARE") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_EM_TRAD_PKWARE_name, &const_EM_TRAD_PKWARE_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_EM_TRAD_PKWARE_name, &const_EM_TRAD_PKWARE_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_EM_TRAD_PKWARE_name); #if defined(HAVE_ENCRYPTION) zval const_EM_AES_128_value; ZVAL_LONG(&const_EM_AES_128_value, ZIP_EM_AES_128); zend_string *const_EM_AES_128_name = zend_string_init_interned("EM_AES_128", sizeof("EM_AES_128") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_EM_AES_128_name, &const_EM_AES_128_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_EM_AES_128_name, &const_EM_AES_128_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_EM_AES_128_name); #endif #if defined(HAVE_ENCRYPTION) @@ -1206,7 +1206,7 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_EM_AES_192_value; ZVAL_LONG(&const_EM_AES_192_value, ZIP_EM_AES_192); zend_string *const_EM_AES_192_name = zend_string_init_interned("EM_AES_192", sizeof("EM_AES_192") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_EM_AES_192_name, &const_EM_AES_192_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_EM_AES_192_name, &const_EM_AES_192_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_EM_AES_192_name); #endif #if defined(HAVE_ENCRYPTION) @@ -1214,34 +1214,34 @@ static zend_class_entry *register_class_ZipArchive(zend_class_entry *class_entry zval const_EM_AES_256_value; ZVAL_LONG(&const_EM_AES_256_value, ZIP_EM_AES_256); zend_string *const_EM_AES_256_name = zend_string_init_interned("EM_AES_256", sizeof("EM_AES_256") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_EM_AES_256_name, &const_EM_AES_256_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_EM_AES_256_name, &const_EM_AES_256_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_EM_AES_256_name); #endif zval const_EM_UNKNOWN_value; ZVAL_LONG(&const_EM_UNKNOWN_value, ZIP_EM_UNKNOWN); zend_string *const_EM_UNKNOWN_name = zend_string_init_interned("EM_UNKNOWN", sizeof("EM_UNKNOWN") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_EM_UNKNOWN_name, &const_EM_UNKNOWN_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_EM_UNKNOWN_name, &const_EM_UNKNOWN_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_EM_UNKNOWN_name); zval const_LIBZIP_VERSION_value; zend_string *const_LIBZIP_VERSION_value_str = zend_string_init(LIBZIP_VERSION_STR, strlen(LIBZIP_VERSION_STR), 1); ZVAL_STR(&const_LIBZIP_VERSION_value, const_LIBZIP_VERSION_value_str); zend_string *const_LIBZIP_VERSION_name = zend_string_init_interned("LIBZIP_VERSION", sizeof("LIBZIP_VERSION") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_LIBZIP_VERSION_name, &const_LIBZIP_VERSION_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_LIBZIP_VERSION_name, &const_LIBZIP_VERSION_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING)); zend_string_release(const_LIBZIP_VERSION_name); zval const_LENGTH_TO_END_value; ZVAL_LONG(&const_LENGTH_TO_END_value, ZIP_LENGTH_TO_END); zend_string *const_LENGTH_TO_END_name = zend_string_init_interned("LENGTH_TO_END", sizeof("LENGTH_TO_END") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_LENGTH_TO_END_name, &const_LENGTH_TO_END_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_LENGTH_TO_END_name, &const_LENGTH_TO_END_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_LENGTH_TO_END_name); #if defined(ZIP_LENGTH_UNCHECKED) zval const_LENGTH_UNCHECKED_value; ZVAL_LONG(&const_LENGTH_UNCHECKED_value, ZIP_LENGTH_UNCHECKED); zend_string *const_LENGTH_UNCHECKED_name = zend_string_init_interned("LENGTH_UNCHECKED", sizeof("LENGTH_UNCHECKED") - 1, 1); - zend_declare_class_constant_ex(class_entry, const_LENGTH_UNCHECKED_name, &const_LENGTH_UNCHECKED_value, ZEND_ACC_PUBLIC, NULL); + zend_declare_typed_class_constant(class_entry, const_LENGTH_UNCHECKED_name, &const_LENGTH_UNCHECKED_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); zend_string_release(const_LENGTH_UNCHECKED_name); #endif From 092726fb1eefeff40f257a1b372d6d27878aa689 Mon Sep 17 00:00:00 2001 From: tekimen Date: Sat, 29 Jul 2023 14:00:47 +0900 Subject: [PATCH 011/120] Fix GH-11785: '++nothing+crc' is not a recognized feature for M1 / M2 macOS compile target (#11796) #pragma GCC target("+nothing+crc") is means clear outs aarch64_isa_flags. However, #pragma clang attribute push(__attribute__((target("+nothing+crc") is not means any, then displays ignore feature. (Not reproduce Linux on ARM (ex: Raspberry Pi)) Therefore, Add new #pragma when compiling on M1/M2 macOS. --- ext/standard/crc32.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c index 602ce3eeb6e2..d9a4a00d9cae 100644 --- a/ext/standard/crc32.c +++ b/ext/standard/crc32.c @@ -68,6 +68,8 @@ static inline int has_crc32_insn(void) { # if!defined(__clang__) # pragma GCC push_options # pragma GCC target ("+nothing+crc") +# elif defined(__APPLE__) +# pragma clang attribute push(__attribute__((target("crc"))), apply_to=function) # else # pragma clang attribute push(__attribute__((target("+nothing+crc"))), apply_to=function) # endif @@ -96,6 +98,8 @@ static uint32_t crc32_aarch64(uint32_t crc, const char *p, size_t nr) { # if defined(__GNUC__) # if !defined(__clang__) # pragma GCC pop_options +# elif defined(__APPLE__) +# pragma clang attribute pop # else # pragma clang attribute pop # endif From 17a80eb08ba6c5a2e2374f9f946a2f3471cc4891 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 28 Jul 2023 03:36:00 +0100 Subject: [PATCH 012/120] ext/mysqli: Remove custom sys_get_temp_dir() function It has existed since PHP 5.2.1... --- ext/mysqli/tests/connect.inc | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index 699ba1651851..d8f94102fdc1 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -25,26 +25,6 @@ /* Development setting: test experimental features and/or feature requests that never worked before? */ $TEST_EXPERIMENTAL = 1 == getenv("MYSQL_TEST_EXPERIMENTAL"); - if (!function_exists('sys_get_temp_dir')) { - function sys_get_temp_dir() { - - if (!empty($_ENV['TMP'])) - return realpath( $_ENV['TMP'] ); - if (!empty($_ENV['TMPDIR'])) - return realpath( $_ENV['TMPDIR'] ); - if (!empty($_ENV['TEMP'])) - return realpath( $_ENV['TEMP'] ); - - $temp_file = tempnam(md5(uniqid(rand(), TRUE)), ''); - if ($temp_file) { - $temp_dir = realpath(dirname($temp_file)); - unlink($temp_file); - return $temp_dir; - } - return FALSE; - } - } - if (!function_exists('my_mysqli_connect')) { /** From 0c21715935de87c930ccf5b0c7909688f961bf23 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 28 Jul 2023 03:40:21 +0100 Subject: [PATCH 013/120] ext/mysqli: Remove conditional function declaration --- ext/mysqli/tests/connect.inc | 122 +++++++++++++++++------------------ 1 file changed, 58 insertions(+), 64 deletions(-) diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index d8f94102fdc1..0d4813226688 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -25,83 +25,77 @@ /* Development setting: test experimental features and/or feature requests that never worked before? */ $TEST_EXPERIMENTAL = 1 == getenv("MYSQL_TEST_EXPERIMENTAL"); - if (!function_exists('my_mysqli_connect')) { - - /** - * Whenever possible, please use this wrapper to make testing of MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible - * - * @param bool $enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS)? - */ - function my_mysqli_connect($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) { - global $connect_flags; - - $flags = $enable_env_flags? $connect_flags:0; - if ($flags !== 0) { - $link = mysqli_init(); - if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags)) - $link = false; - } else { - $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); - } - - return $link; + /** + * Whenever possible, please use this wrapper to make testing of MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible + * + * @param bool $enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS)? + */ + function my_mysqli_connect($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) { + global $connect_flags; + + $flags = $enable_env_flags? $connect_flags:0; + if ($flags !== 0) { + $link = mysqli_init(); + if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags)) + $link = false; + } else { + $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket); } - /** - * Whenever possible, please use this wrapper to make testing of MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible - * - * @param bool $enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS) - */ - function my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags = 0, $enable_env_flags = true) { - global $connect_flags; + return $link; + } - if ($enable_env_flags) - $flags = $flags | $connect_flags; + /** + * Whenever possible, please use this wrapper to make testing of MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible + * + * @param bool $enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS) + */ + function my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags = 0, $enable_env_flags = true) { + global $connect_flags; - return mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags); - } + if ($enable_env_flags) + $flags = $flags | $connect_flags; - class my_mysqli extends mysqli { - public function __construct($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) { - global $connect_flags; + return mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags); + } - $flags = ($enable_env_flags) ? $connect_flags : 0; + class my_mysqli extends mysqli { + public function __construct($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) { + global $connect_flags; - if ($flags !== 0) { - parent::__construct(); - $this->real_connect($host, $user, $passwd, $db, $port, $socket, $flags); - } else { - parent::__construct($host, $user, $passwd, $db, $port, $socket); - } + $flags = ($enable_env_flags) ? $connect_flags : 0; + + if ($flags !== 0) { + parent::__construct(); + $this->real_connect($host, $user, $passwd, $db, $port, $socket, $flags); + } else { + parent::__construct($host, $user, $passwd, $db, $port, $socket); } } + } - function have_innodb($link) { - if (($res = $link->query("SHOW VARIABLES LIKE 'have_innodb'")) - && ($row = $res->fetch_row()) - && !empty($row) - ) { - return !($row[1] == 'DISABLED' || $row[1] == 'NO'); - } - // MySQL 5.6.1+ - if ($res = $link->query('SHOW ENGINES')) { - while ($row = $res->fetch_assoc()) { - if (!isset($row['Engine']) || !isset($row['Support'])) { - return false; - } - - if (($row['Engine'] == 'InnoDB') - && (($row['Support'] == 'YES') || ($row['Support'] == 'DEFAULT')) - ) { - return true; - } + function have_innodb($link) { + if (($res = $link->query("SHOW VARIABLES LIKE 'have_innodb'")) + && ($row = $res->fetch_row()) + && !empty($row) + ) { + return !($row[1] == 'DISABLED' || $row[1] == 'NO'); + } + // MySQL 5.6.1+ + if ($res = $link->query('SHOW ENGINES')) { + while ($row = $res->fetch_assoc()) { + if (!isset($row['Engine']) || !isset($row['Support'])) { + return false; + } + + if (($row['Engine'] == 'InnoDB') + && (($row['Support'] == 'YES') || ($row['Support'] == 'DEFAULT')) + ) { + return true; } } - return false; } - - } else { - printf("skip Eeeek/BUG/FIXME - connect.inc included twice! skipif bug?\n"); + return false; } function handle_catchable_fatal($errno, $error, $file, $line) { From 8582d97b8cb73d38bc4eebb12dd9193d720a701d Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 28 Jul 2023 03:56:51 +0100 Subject: [PATCH 014/120] ext/mysqli: Stop using global variable in connection test helper --- ext/mysqli/tests/connect.inc | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index 0d4813226688..b7699d80ee49 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -17,7 +17,6 @@ $engine = getenv("MYSQL_TEST_ENGINE") ?: "InnoDB"; $socket = getenv("MYSQL_TEST_SOCKET") ?: null; $skip_on_connect_failure = getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") ?: true; - $connect_flags = (int)getenv("MYSQL_TEST_CONNECT_FLAGS") ?: 0; if ($socket) { ini_set('mysqli.default_socket', $socket); } @@ -25,15 +24,21 @@ /* Development setting: test experimental features and/or feature requests that never worked before? */ $TEST_EXPERIMENTAL = 1 == getenv("MYSQL_TEST_EXPERIMENTAL"); + function get_environment_connection_flags(): int { + static $connect_flags = null; + if ($connect_flags === null) { + $connect_flags = (int)getenv("MYSQL_TEST_CONNECT_FLAGS") ?: 0; + } + return $connect_flags; + } + /** * Whenever possible, please use this wrapper to make testing of MYSQLI_CLIENT_COMPRESS (and potentially SSL) possible * * @param bool $enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS)? */ function my_mysqli_connect($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) { - global $connect_flags; - - $flags = $enable_env_flags? $connect_flags:0; + $flags = $enable_env_flags? get_environment_connection_flags():0; if ($flags !== 0) { $link = mysqli_init(); if (!mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags)) @@ -51,19 +56,16 @@ * @param bool $enable_env_flags Enable setting of connection flags through env(MYSQL_TEST_CONNECT_FLAGS) */ function my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags = 0, $enable_env_flags = true) { - global $connect_flags; - - if ($enable_env_flags) - $flags = $flags | $connect_flags; + if ($enable_env_flags) { + $flags = $flags | get_environment_connection_flags(); + } return mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket, $flags); } class my_mysqli extends mysqli { public function __construct($host, $user, $passwd, $db, $port, $socket, $enable_env_flags = true) { - global $connect_flags; - - $flags = ($enable_env_flags) ? $connect_flags : 0; + $flags = ($enable_env_flags) ? get_environment_connection_flags() : 0; if ($flags !== 0) { parent::__construct(); @@ -113,4 +115,3 @@ return true; } -?> From b389846d05692c07405d8269ce2731f947b41c16 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 28 Jul 2023 04:08:33 +0100 Subject: [PATCH 015/120] ext/mysqli: Remove catchable fatal error handler Recoverable fatal error haven't been a thing for a while, and proper fatal error have never been catchable --- ext/mysqli/tests/connect.inc | 16 -------- ext/mysqli/tests/mysqli_fetch_object.phpt | 24 +++++------ ext/mysqli/tests/mysqli_fetch_object_oo.phpt | 43 ++++++++++---------- 3 files changed, 32 insertions(+), 51 deletions(-) diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index b7699d80ee49..eb063d2f4dfd 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -99,19 +99,3 @@ } return false; } - - function handle_catchable_fatal($errno, $error, $file, $line) { - static $errcodes = array(); - if (empty($errcodes)) { - $constants = get_defined_constants(); - foreach ($constants as $name => $value) { - if (substr($name, 0, 2) == "E_") - $errcodes[$value] = $name; - } - } - printf("[%s] %s in %s on line %s\n", - (isset($errcodes[$errno])) ? $errcodes[$errno] : $errno, - $error, $file, $line); - - return true; - } diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index 0bf393f5cdd5..e409677146c6 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -10,8 +10,6 @@ require_once('skipifconnectfailure.inc'); getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } try { @@ -68,7 +66,7 @@ require_once('skipifconnectfailure.inc'); var_dump($obj); } } catch (Throwable $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } $obj = mysqli_fetch_object($res, 'mysqli_fetch_object_construct', array('a', 'b')); @@ -104,8 +102,8 @@ require_once('skipifconnectfailure.inc'); try { if (false !== ($obj = @mysqli_fetch_object($res, 'mysqli_fetch_object_construct', 'a'))) printf("[011] Should have failed\n"); - } catch (Error $e) { - handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } mysqli_free_result($res); @@ -131,8 +129,8 @@ require_once('skipifconnectfailure.inc'); try { var_dump(mysqli_fetch_object($res, 'this_class_does_not_exist')); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } @@ -143,12 +141,12 @@ require_once('skipifconnectfailure.inc'); ---EXPECTF-- -Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 0 passed and exactly 2 expected -Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 1 passed and exactly 2 expected +--EXPECT-- +ArgumentCountError: Too few arguments to function mysqli_fetch_object_construct::__construct(), 0 passed and exactly 2 expected +ArgumentCountError: Too few arguments to function mysqli_fetch_object_construct::__construct(), 1 passed and exactly 2 expected NULL NULL mysqli_result object is already closed -[0] mysqli_fetch_object(): Argument #3 ($constructor_args) must be of type array, string given in %s on line %d -mysqli_fetch_object(): Argument #2 ($class) must be a valid class name, this_class_does_not_exist given +TypeError: mysqli_fetch_object(): Argument #3 ($constructor_args) must be of type array, string given +TypeError: mysqli_fetch_object(): Argument #2 ($class) must be a valid class name, this_class_does_not_exist given done! diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index 2ddba280f43a..56880828c355 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -9,13 +9,12 @@ require_once('skipifconnectfailure.inc'); --FILE-- getMessage() . "\n"; + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } require('table.inc'); @@ -30,16 +29,16 @@ require_once('skipifconnectfailure.inc'); try { if (!is_null($tmp = @$res->fetch_object($link, $link))) printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - } catch (Error $e) { - handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } try { if (!is_null($tmp = @$res->fetch_object($link, $link, $link))) printf("[006] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); - } catch (Error $e) { - handle_catchable_fatal($e->getCode(), $e->getMessage(), $e->getFile(), $e->getLine()); + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } $obj = mysqli_fetch_object($res); @@ -76,8 +75,8 @@ require_once('skipifconnectfailure.inc'); try { $res->fetch_object('mysqli_fetch_object_construct', null); - } catch (TypeError $exception) { - echo $exception->getMessage() . "\n"; + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; mysqli_fetch_object($res); } @@ -88,7 +87,7 @@ require_once('skipifconnectfailure.inc'); var_dump($obj); } } catch (Throwable $e) { - echo "Exception: " . $e->getMessage() . "\n"; + echo $e::class, ': ', $e->getMessage(), "\n"; } $obj = $res->fetch_object('mysqli_fetch_object_construct', array('a', 'b')); @@ -110,14 +109,14 @@ require_once('skipifconnectfailure.inc'); try { mysqli_fetch_object($res); - } catch (Error $exception) { - echo $exception->getMessage() . "\n"; + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } try { var_dump($res->fetch_object('this_class_does_not_exist')); - } catch (TypeError $exception) { - echo $exception->getMessage() . "\n"; + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; } $mysqli->close(); @@ -127,14 +126,14 @@ require_once('skipifconnectfailure.inc'); ---EXPECTF-- -mysqli object is not fully initialized -[0] Object of class mysqli could not be converted to string in %s on line %d -[0] mysqli_result::fetch_object() expects at most 2 arguments, 3 given in %s on line %d -mysqli_result::fetch_object(): Argument #2 ($constructor_args) must be of type array, null given -Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 1 passed and exactly 2 expected +--EXPECT-- +Error: mysqli object is not fully initialized +Error: Object of class mysqli could not be converted to string +ArgumentCountError: mysqli_result::fetch_object() expects at most 2 arguments, 3 given +TypeError: mysqli_result::fetch_object(): Argument #2 ($constructor_args) must be of type array, null given +ArgumentCountError: Too few arguments to function mysqli_fetch_object_construct::__construct(), 1 passed and exactly 2 expected NULL NULL -mysqli_result object is already closed -mysqli_result::fetch_object(): Argument #1 ($class) must be a valid class name, this_class_does_not_exist given +Error: mysqli_result object is already closed +TypeError: mysqli_result::fetch_object(): Argument #1 ($class) must be a valid class name, this_class_does_not_exist given done! From ae66a0d1421cf727f9280c75117ddd70f26461a7 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:25:12 +0200 Subject: [PATCH 016/120] Corrections to return type of loading DOM documents --- UPGRADING | 5 ++ ext/dom/document.c | 135 +++++++++++++++++--------------------- ext/dom/php_dom.stub.php | 16 ++--- ext/dom/php_dom_arginfo.h | 10 +-- 4 files changed, 77 insertions(+), 89 deletions(-) diff --git a/UPGRADING b/UPGRADING index 01ee10d9f144..11668111f7fd 100644 --- a/UPGRADING +++ b/UPGRADING @@ -202,6 +202,11 @@ PHP 8.3 UPGRADE NOTES - Dom: . Changed DOMCharacterData::appendData() tentative return type to true. + . DOMDocument::loadHTML(), DOMDocument::loadHTMLFile(), DOMDocument::loadXML(), + and DOMDocument::loadXMLFile() now have a tentative return type of bool. + Previously, this was documented as having a return type of DOMDocument|bool, + but DOMDocument cannot be returned since PHP 8.0 as it is no longer statically + callable. - Gd: . Changed imagerotate signature, removed the `ignore_transparent` argument diff --git a/ext/dom/document.c b/ext/dom/document.c index 2ee5435d8d28..9c5e2937560b 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1318,20 +1318,14 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t so /* {{{ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) */ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) { - zval *id; xmlDoc *docp = NULL, *newdoc; dom_doc_propsptr doc_prop; dom_object *intern; char *source; size_t source_len; - int refcount, ret; + int refcount; zend_long options = 0; - id = getThis(); - if (id != NULL && ! instanceof_function(Z_OBJCE_P(id), dom_document_class_entry)) { - id = NULL; - } - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &source, &source_len, &options) == FAILURE) { RETURN_THROWS(); } @@ -1349,48 +1343,44 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) { RETURN_FALSE; } - newdoc = dom_document_parser(id, mode, source, source_len, options); + newdoc = dom_document_parser(ZEND_THIS, mode, source, source_len, options); if (!newdoc) RETURN_FALSE; - if (id != NULL) { - intern = Z_DOMOBJ_P(id); - size_t old_modification_nr = 0; - if (intern != NULL) { - docp = (xmlDocPtr) dom_object_get_node(intern); - doc_prop = NULL; - if (docp != NULL) { - const php_libxml_doc_ptr *doc_ptr = docp->_private; - ZEND_ASSERT(doc_ptr != NULL); /* Must exist, we have a document */ - old_modification_nr = doc_ptr->cache_tag.modification_nr; - php_libxml_decrement_node_ptr((php_libxml_node_object *) intern); - doc_prop = intern->document->doc_props; - intern->document->doc_props = NULL; - refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern); - if (refcount != 0) { - docp->_private = NULL; - } - } - intern->document = NULL; - if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, newdoc) == -1) { - RETURN_FALSE; + intern = Z_DOMOBJ_P(ZEND_THIS); + size_t old_modification_nr = 0; + if (intern != NULL) { + docp = (xmlDocPtr) dom_object_get_node(intern); + doc_prop = NULL; + if (docp != NULL) { + const php_libxml_doc_ptr *doc_ptr = docp->_private; + ZEND_ASSERT(doc_ptr != NULL); /* Must exist, we have a document */ + old_modification_nr = doc_ptr->cache_tag.modification_nr; + php_libxml_decrement_node_ptr((php_libxml_node_object *) intern); + doc_prop = intern->document->doc_props; + intern->document->doc_props = NULL; + refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern); + if (refcount != 0) { + docp->_private = NULL; } - intern->document->doc_props = doc_prop; } - - php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)newdoc, (void *)intern); - /* Since iterators should invalidate, we need to start the modification number from the old counter */ - if (old_modification_nr != 0) { - php_libxml_doc_ptr* doc_ptr = (php_libxml_doc_ptr*) ((php_libxml_node_object*) intern)->node; /* downcast */ - doc_ptr->cache_tag.modification_nr = old_modification_nr; - php_libxml_invalidate_node_list_cache(doc_ptr); + intern->document = NULL; + if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, newdoc) == -1) { + RETURN_FALSE; } + intern->document->doc_props = doc_prop; + } - RETURN_TRUE; - } else { - DOM_RET_OBJ((xmlNodePtr) newdoc, &ret, NULL); + php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)newdoc, (void *)intern); + /* Since iterators should invalidate, we need to start the modification number from the old counter */ + if (old_modification_nr != 0) { + php_libxml_doc_ptr* doc_ptr = (php_libxml_doc_ptr*) ((php_libxml_node_object*) intern)->node; /* downcast */ + doc_ptr->cache_tag.modification_nr = old_modification_nr; + php_libxml_invalidate_node_list_cache(doc_ptr); } + + RETURN_TRUE; } /* }}} end dom_parser_document */ @@ -1865,18 +1855,15 @@ PHP_METHOD(DOMDocument, relaxNGValidateSource) static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ { - zval *id; xmlDoc *docp = NULL, *newdoc; dom_object *intern; dom_doc_propsptr doc_prop; char *source; size_t source_len; - int refcount, ret; + int refcount; zend_long options = 0; htmlParserCtxtPtr ctxt; - id = getThis(); - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &source, &source_len, &options) == FAILURE) { RETURN_THROWS(); } @@ -1926,43 +1913,39 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ if (!newdoc) RETURN_FALSE; - if (id != NULL && instanceof_function(Z_OBJCE_P(id), dom_document_class_entry)) { - intern = Z_DOMOBJ_P(id); - size_t old_modification_nr = 0; - if (intern != NULL) { - docp = (xmlDocPtr) dom_object_get_node(intern); - doc_prop = NULL; - if (docp != NULL) { - const php_libxml_doc_ptr *doc_ptr = docp->_private; - ZEND_ASSERT(doc_ptr != NULL); /* Must exist, we have a document */ - old_modification_nr = doc_ptr->cache_tag.modification_nr; - php_libxml_decrement_node_ptr((php_libxml_node_object *) intern); - doc_prop = intern->document->doc_props; - intern->document->doc_props = NULL; - refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern); - if (refcount != 0) { - docp->_private = NULL; - } - } - intern->document = NULL; - if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, newdoc) == -1) { - RETURN_FALSE; + intern = Z_DOMOBJ_P(ZEND_THIS); + size_t old_modification_nr = 0; + if (intern != NULL) { + docp = (xmlDocPtr) dom_object_get_node(intern); + doc_prop = NULL; + if (docp != NULL) { + const php_libxml_doc_ptr *doc_ptr = docp->_private; + ZEND_ASSERT(doc_ptr != NULL); /* Must exist, we have a document */ + old_modification_nr = doc_ptr->cache_tag.modification_nr; + php_libxml_decrement_node_ptr((php_libxml_node_object *) intern); + doc_prop = intern->document->doc_props; + intern->document->doc_props = NULL; + refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern); + if (refcount != 0) { + docp->_private = NULL; } - intern->document->doc_props = doc_prop; } - - php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)newdoc, (void *)intern); - /* Since iterators should invalidate, we need to start the modification number from the old counter */ - if (old_modification_nr != 0) { - php_libxml_doc_ptr* doc_ptr = (php_libxml_doc_ptr*) ((php_libxml_node_object*) intern)->node; /* downcast */ - doc_ptr->cache_tag.modification_nr = old_modification_nr; - php_libxml_invalidate_node_list_cache(doc_ptr); + intern->document = NULL; + if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, newdoc) == -1) { + RETURN_FALSE; } + intern->document->doc_props = doc_prop; + } - RETURN_TRUE; - } else { - DOM_RET_OBJ((xmlNodePtr) newdoc, &ret, NULL); + php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)newdoc, (void *)intern); + /* Since iterators should invalidate, we need to start the modification number from the old counter */ + if (old_modification_nr != 0) { + php_libxml_doc_ptr* doc_ptr = (php_libxml_doc_ptr*) ((php_libxml_node_object*) intern)->node; /* downcast */ + doc_ptr->cache_tag.modification_nr = old_modification_nr; + php_libxml_invalidate_node_list_cache(doc_ptr); } + + RETURN_TRUE; } /* }}} */ diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php index 29aaf07e4b17..955721dd230c 100644 --- a/ext/dom/php_dom.stub.php +++ b/ext/dom/php_dom.stub.php @@ -774,11 +774,11 @@ public function getElementsByTagNameNS(?string $namespace, string $localName): D /** @return DOMNode|false */ public function importNode(DOMNode $node, bool $deep = false) {} - /** @return DOMDocument|bool */ - public function load(string $filename, int $options = 0) {} // TODO return type shouldn't depend on the call scope + /** @tentative-return-type */ + public function load(string $filename, int $options = 0): bool {} - /** @return DOMDocument|bool */ - public function loadXML(string $source, int $options = 0) {} // TODO return type shouldn't depend on the call scope + /** @tentative-return-type */ + public function loadXML(string $source, int $options = 0): bool {} /** @tentative-return-type */ public function normalizeDocument(): void {} @@ -790,11 +790,11 @@ public function registerNodeClass(string $baseClass, ?string $extendedClass): bo public function save(string $filename, int $options = 0): int|false {} #ifdef LIBXML_HTML_ENABLED - /** @return DOMDocument|bool */ - public function loadHTML(string $source, int $options = 0) {} // TODO return type shouldn't depend on the call scope + /** @tentative-return-type */ + public function loadHTML(string $source, int $options = 0): bool {} - /** @return DOMDocument|bool */ - public function loadHTMLFile(string $filename, int $options = 0) {} // TODO return type shouldn't depend on the call scope + /** @tentative-return-type */ + public function loadHTMLFile(string $filename, int $options = 0): bool {} /** @tentative-return-type */ public function saveHTML(?DOMNode $node = null): string|false {} diff --git a/ext/dom/php_dom_arginfo.h b/ext/dom/php_dom_arginfo.h index 28bc38296369..aee74f130e5a 100644 --- a/ext/dom/php_dom_arginfo.h +++ b/ext/dom/php_dom_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3a37adaf011606d10ae1fa12ce135a23b3e07cf4 */ + * Stub hash: 8bfa8e742552be6f1fb85593dcab2e755f1d5089 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 0) ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0) @@ -371,12 +371,12 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_importNode, 0, 0, 1) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, deep, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_load, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DOMDocument_load, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadXML, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DOMDocument_loadXML, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() @@ -394,14 +394,14 @@ ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_DOMDocument_save ZEND_END_ARG_INFO() #if defined(LIBXML_HTML_ENABLED) -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadHTML, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DOMDocument_loadHTML, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, source, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() #endif #if defined(LIBXML_HTML_ENABLED) -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DOMDocument_loadHTMLFile, 0, 0, 1) +ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DOMDocument_loadHTMLFile, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0") ZEND_END_ARG_INFO() From 655f116be57b46efe32221d7adfec6d6b81eeece Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 29 Jul 2023 17:35:42 +0200 Subject: [PATCH 017/120] XLEAK XML_SAVE_NO_DECL test for old libxml2 versions --- ext/dom/tests/DOMDocument_saveXML_XML_SAVE_NO_DECL.phpt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/dom/tests/DOMDocument_saveXML_XML_SAVE_NO_DECL.phpt b/ext/dom/tests/DOMDocument_saveXML_XML_SAVE_NO_DECL.phpt index 240e5d498482..2a51b88cd59f 100644 --- a/ext/dom/tests/DOMDocument_saveXML_XML_SAVE_NO_DECL.phpt +++ b/ext/dom/tests/DOMDocument_saveXML_XML_SAVE_NO_DECL.phpt @@ -2,6 +2,10 @@ DOMDocument::saveXML(): XML_SAVE_NO_DECL --EXTENSIONS-- dom +--SKIPIF-- + --FILE-- Date: Sat, 29 Jul 2023 17:03:20 +0200 Subject: [PATCH 018/120] Fix uaf of MBSTRG(all_encodings_list) We need to remove the value from the GC buffer before freeing it. Otherwise shutdown will uaf when running the gc. Do that by switching from zend_hash_destroy to zend_array_destroy, which should also be faster for freeing members due to inlining of i_zval_ptr_dtor. Closes GH-11822 --- NEWS | 3 +++ ext/mbstring/mbstring.c | 3 +-- ext/mbstring/tests/mb_list_encodings_gc_uaf.phpt | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 ext/mbstring/tests/mb_list_encodings_gc_uaf.phpt diff --git a/NEWS b/NEWS index 982898615a32..9506c5960fdb 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,9 @@ PHP NEWS - FFI: . Fix leaking definitions when using FFI::cdef()->new(...). (ilutov) +- MBString: + . Fix use-after-free of mb_list_encodings() return value. (ilutov) + - Streams: . Fixed bug GH-11735 (Use-after-free when unregistering user stream wrapper from itself). (ilutov) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 13ad7952b986..3e59806b8675 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1159,8 +1159,7 @@ PHP_RSHUTDOWN_FUNCTION(mbstring) if (MBSTRG(all_encodings_list)) { GC_DELREF(MBSTRG(all_encodings_list)); - zend_hash_destroy(MBSTRG(all_encodings_list)); - efree(MBSTRG(all_encodings_list)); + zend_array_destroy(MBSTRG(all_encodings_list)); MBSTRG(all_encodings_list) = NULL; } diff --git a/ext/mbstring/tests/mb_list_encodings_gc_uaf.phpt b/ext/mbstring/tests/mb_list_encodings_gc_uaf.phpt new file mode 100644 index 000000000000..4a83372b1674 --- /dev/null +++ b/ext/mbstring/tests/mb_list_encodings_gc_uaf.phpt @@ -0,0 +1,9 @@ +--TEST-- +Use-after-free of MBSTRG(all_encodings_list) on shutdown +--EXTENSIONS-- +mbstring +--FILE-- + +--EXPECT-- From b5f8a7270a9ba3544fcc713aad8f8fa17795caca Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Mon, 31 Jul 2023 14:50:13 +0300 Subject: [PATCH 019/120] Fixed incorrect QM_ASSIGN elimination Fixes OSS Fuzz #60895 --- Zend/Optimizer/block_pass.c | 3 ++- ext/opcache/tests/opt/block_pass_005.phpt | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ext/opcache/tests/opt/block_pass_005.phpt diff --git a/Zend/Optimizer/block_pass.c b/Zend/Optimizer/block_pass.c index 4d5c951d3df3..72441c000e66 100644 --- a/Zend/Optimizer/block_pass.c +++ b/Zend/Optimizer/block_pass.c @@ -174,7 +174,8 @@ static void zend_optimize_block(zend_basic_block *block, zend_op_array *op_array && opline->opcode != ZEND_MATCH && zend_optimizer_update_op1_const(op_array, opline, &c)) { VAR_SOURCE(op1) = NULL; - if (!zend_bitset_in(used_ext, VAR_NUM(src->result.var))) { + if (opline->opcode != ZEND_JMP_NULL + && !zend_bitset_in(used_ext, VAR_NUM(src->result.var))) { literal_dtor(&ZEND_OP1_LITERAL(src)); MAKE_NOP(src); } diff --git a/ext/opcache/tests/opt/block_pass_005.phpt b/ext/opcache/tests/opt/block_pass_005.phpt new file mode 100644 index 000000000000..d57fe22d71bf --- /dev/null +++ b/ext/opcache/tests/opt/block_pass_005.phpt @@ -0,0 +1,17 @@ +--TEST-- +Block Pass 005: Inorrect QM_ASSIGN elimination +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.optimization_level=-1 +--EXTENSIONS-- +opcache +--FILE-- +y; +?> +--EXPECTF-- +Fatal error: Uncaught Error: Undefined constant "y" in %sblock_pass_005.php:2 +Stack trace: +#0 {main} + thrown in %sblock_pass_005.php on line 2 From 2053af66281ee5ca80ea6d20f8ba1881eb5e03ea Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 19 Jul 2023 18:10:58 +0200 Subject: [PATCH 020/120] Fix uouv in array_column column_long and index_long might not be set, but are still used as arguments. They are not actually used if column_str is set, but it's better to initialize them anyway, if only to make MemorySanitizer happy. --- ext/standard/array.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/standard/array.c b/ext/standard/array.c index 235bdf79d5a4..eee260f22431 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -4513,10 +4513,10 @@ PHP_FUNCTION(array_column) HashTable *input; zval *colval, *data, rv; zend_string *column_str = NULL; - zend_long column_long; + zend_long column_long = 0; bool column_is_null = 0; zend_string *index_str = NULL; - zend_long index_long; + zend_long index_long = 0; bool index_is_null = 1; ZEND_PARSE_PARAMETERS_START(2, 3) From a145b40fa610a2a97986c6319d56131e829ed988 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 20 Jul 2023 12:28:11 +0200 Subject: [PATCH 021/120] Fix uouv in password_needs_rehash() and password_hash() --- ext/standard/password.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/standard/password.c b/ext/standard/password.c index af1b68af1082..c3f7f7382183 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -589,9 +589,9 @@ PHP_FUNCTION(password_needs_rehash) const php_password_algo *old_algo, *new_algo; zend_string *hash; zend_string *new_algo_str; - zend_long new_algo_long; + zend_long new_algo_long = 0; bool new_algo_is_null; - zend_array *options = 0; + zend_array *options = NULL; ZEND_PARSE_PARAMETERS_START(2, 3) Z_PARAM_STR(hash) @@ -637,7 +637,7 @@ PHP_FUNCTION(password_hash) { zend_string *password, *digest = NULL; zend_string *algo_str; - zend_long algo_long; + zend_long algo_long = 0; bool algo_is_null; const php_password_algo *algo; zend_array *options = NULL; From 322da7bcc341dc38b43fb79d61943c6f236f74b8 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 31 Jul 2023 13:50:19 +0200 Subject: [PATCH 022/120] Fix various uouv in intl --- ext/intl/uchar/uchar.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/intl/uchar/uchar.c b/ext/intl/uchar/uchar.c index c85bcb3fcffd..2cd0de941a01 100644 --- a/ext/intl/uchar/uchar.c +++ b/ext/intl/uchar/uchar.c @@ -86,7 +86,7 @@ IC_METHOD(hasBinaryProperty) { UChar32 cp; zend_long prop; zend_string *string_codepoint; - zend_long int_codepoint; + zend_long int_codepoint = 0; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint) @@ -106,7 +106,7 @@ IC_METHOD(getIntPropertyValue) { UChar32 cp; zend_long prop; zend_string *string_codepoint; - zend_long int_codepoint; + zend_long int_codepoint = 0; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint) @@ -214,7 +214,7 @@ IC_METHOD(getBlockCode) { IC_METHOD(charName) { UChar32 cp; zend_string *string_codepoint; - zend_long int_codepoint; + zend_long int_codepoint = 0; UErrorCode error = U_ZERO_ERROR; zend_long nameChoice = U_UNICODE_CHAR_NAME; zend_string *buffer = NULL; @@ -294,7 +294,7 @@ static UBool enumCharNames_callback(enumCharNames_data *context, IC_METHOD(enumCharNames) { UChar32 start, limit; zend_string *string_start, *string_limit; - zend_long int_start, int_limit; + zend_long int_start = 0, int_limit = 0; enumCharNames_data context; zend_long nameChoice = U_UNICODE_CHAR_NAME; UErrorCode error = U_ZERO_ERROR; @@ -391,7 +391,7 @@ IC_METHOD(foldCase) { UChar32 cp, ret; zend_long options = U_FOLD_CASE_DEFAULT; zend_string *string_codepoint; - zend_long int_codepoint; + zend_long int_codepoint = 0; ZEND_PARSE_PARAMETERS_START(2, 2) Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint) @@ -421,7 +421,7 @@ IC_METHOD(digit) { zend_long radix = 10; int ret; zend_string *string_codepoint; - zend_long int_codepoint; + zend_long int_codepoint = 0; ZEND_PARSE_PARAMETERS_START(1, 2) Z_PARAM_STR_OR_LONG(string_codepoint, int_codepoint) From 82aa4253f17777764437a7cd601810368b43ac90 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 31 Jul 2023 13:51:08 +0200 Subject: [PATCH 023/120] Fix some uouv in ext/pgsql --- ext/pgsql/pgsql.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index a6cdd590aa59..31f15cbe6aca 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1693,7 +1693,7 @@ PHP_FUNCTION(pg_fetch_result) { zval *result; zend_string *field_name; - zend_long row, field_offset; + zend_long row, field_offset = 0; bool row_is_null = false; PGresult *pgsql_result; pgsql_result_handle *pg_result; @@ -2004,7 +2004,7 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type, bo { zval *result; zend_string *field_name; - zend_long row, field_offset; + zend_long row, field_offset = 0; bool row_is_null = false; PGresult *pgsql_result; pgsql_result_handle *pg_result; From 605c60cd5f20e360f2633b74bd422df858b35ffc Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 31 Jul 2023 10:19:31 -0400 Subject: [PATCH 024/120] Skip oci8 tests when no database is available (#11820) Most oci8 tests fail out-of-the-box because a typical host won't have an Oracle database instance available. Other database drivers like mysqli and pgsql address this problem with an include file, inserted into SKIPIF, that skips the test if no connection at all can be made. This commits adds such a file (skipifconnectfailure.inc) for oci8, and adds the corresponding SKIPIF to any tests that connect to a database. Closes GH-11804 * ext/oci8/tests/lob_aliases.phpt: drop unnecessary SKIPIF. --- ext/oci8/tests/array_bind_001.phpt | 4 +++ ext/oci8/tests/array_bind_002.phpt | 4 +++ ext/oci8/tests/array_bind_003.phpt | 1 + ext/oci8/tests/array_bind_004.phpt | 1 + ext/oci8/tests/array_bind_005.phpt | 1 + ext/oci8/tests/array_bind_006.phpt | 1 + ext/oci8/tests/array_bind_007.phpt | 4 +++ ext/oci8/tests/array_bind_008.phpt | 1 + ext/oci8/tests/array_bind_009.phpt | 4 +++ ext/oci8/tests/array_bind_010.phpt | 4 +++ ext/oci8/tests/array_bind_011.phpt | 4 +++ ext/oci8/tests/array_bind_012.phpt | 4 +++ ext/oci8/tests/array_bind_013.phpt | 4 +++ ext/oci8/tests/array_bind_014.phpt | 1 + ext/oci8/tests/array_bind_bdouble.phpt | 1 + ext/oci8/tests/array_bind_bfloat.phpt | 1 + ext/oci8/tests/array_bind_date.phpt | 1 + ext/oci8/tests/array_bind_date1.phpt | 1 + ext/oci8/tests/array_bind_float.phpt | 1 + ext/oci8/tests/array_bind_float1.phpt | 1 + ext/oci8/tests/array_bind_int.phpt | 1 + ext/oci8/tests/array_bind_int1.phpt | 1 + ext/oci8/tests/array_bind_str.phpt | 1 + ext/oci8/tests/array_bind_str1.phpt | 1 + ext/oci8/tests/array_bind_uin.phpt | 1 + ext/oci8/tests/b47243_1.phpt | 1 + ext/oci8/tests/b47243_2.phpt | 1 + ext/oci8/tests/b47243_3.phpt | 1 + ext/oci8/tests/bind_boolean_1.phpt | 1 + ext/oci8/tests/bind_char_1.phpt | 1 + ext/oci8/tests/bind_char_2.phpt | 1 + ext/oci8/tests/bind_char_3.phpt | 1 + ext/oci8/tests/bind_char_4.phpt | 1 + ext/oci8/tests/bind_empty.phpt | 4 +++ ext/oci8/tests/bind_long.phpt | 1 + ext/oci8/tests/bind_long_raw.phpt | 1 + ext/oci8/tests/bind_misccoltypes.phpt | 1 + ext/oci8/tests/bind_misccoltypes_errs.phpt | 4 +++ ext/oci8/tests/bind_number.phpt | 4 +++ ext/oci8/tests/bind_query.phpt | 4 +++ ext/oci8/tests/bind_raw.phpt | 1 + ext/oci8/tests/bind_raw_2.phpt | 1 + ext/oci8/tests/bind_rowid.phpt | 4 +++ ext/oci8/tests/bind_sqltafc.phpt | 4 +++ ext/oci8/tests/bind_sqltchr_1.phpt | 4 +++ ext/oci8/tests/bind_sqltchr_2.phpt | 4 +++ ext/oci8/tests/bind_sqltint.phpt | 4 +++ ext/oci8/tests/bind_sqltnum.phpt | 1 + ext/oci8/tests/bind_unsupported_1.phpt | 4 +++ ext/oci8/tests/bind_unsupported_2.phpt | 4 +++ ext/oci8/tests/bind_unsupported_3.phpt | 1 + ext/oci8/tests/bug26133.phpt | 4 +++ ext/oci8/tests/bug27303_1.phpt | 1 + ext/oci8/tests/bug27303_2.phpt | 1 + ext/oci8/tests/bug27303_3.phpt | 4 +++ ext/oci8/tests/bug27303_4.phpt | 1 + ext/oci8/tests/bug32325.phpt | 1 + ext/oci8/tests/bug35973.phpt | 1 + ext/oci8/tests/bug36010.phpt | 1 + ext/oci8/tests/bug36096.phpt | 4 +++ ext/oci8/tests/bug36403.phpt | 4 +++ ext/oci8/tests/bug37220.phpt | 1 + ext/oci8/tests/bug37581.phpt | 1 + ext/oci8/tests/bug38161.phpt | 4 +++ ext/oci8/tests/bug38173.phpt | 1 + ext/oci8/tests/bug40078.phpt | 1 + ext/oci8/tests/bug40415.phpt | 1 + ext/oci8/tests/bug41069.phpt | 1 + ext/oci8/tests/bug42134.phpt | 1 + ext/oci8/tests/bug42173.phpt | 1 + ext/oci8/tests/bug42496_1.phpt | 3 +- ext/oci8/tests/bug42496_2.phpt | 3 +- ext/oci8/tests/bug42841.phpt | 1 + ext/oci8/tests/bug43492.phpt | 1 + ext/oci8/tests/bug43492_2.phpt | 1 + ext/oci8/tests/bug43497.phpt | 1 + ext/oci8/tests/bug44008.phpt | 1 + ext/oci8/tests/bug44113.phpt | 1 + ext/oci8/tests/bug44206.phpt | 1 + ext/oci8/tests/bug45458.phpt | 4 +++ ext/oci8/tests/bug46994.phpt | 1 + ext/oci8/tests/bug47189.phpt | 1 + ext/oci8/tests/bug47281.phpt | 1 + ext/oci8/tests/bug47281_tt.phpt | 1 + ext/oci8/tests/bug51253.phpt | 1 + ext/oci8/tests/bug51291_1.phpt | 4 +++ ext/oci8/tests/bug51291_2.phpt | 1 + ext/oci8/tests/bug68298.phpt | 1 + ext/oci8/tests/bug70700.phpt | 1 + ext/oci8/tests/bug71148.phpt | 1 + ext/oci8/tests/bug71422.phpt | 4 +++ ext/oci8/tests/bug71600.phpt | 1 + ext/oci8/tests/bug72524.phpt | 1 + ext/oci8/tests/bug74625.phpt | 4 +++ ext/oci8/tests/calltimeout1.phpt | 1 + ext/oci8/tests/close.phpt | 4 +++ ext/oci8/tests/coll_001.phpt | 1 + ext/oci8/tests/coll_002.phpt | 1 + ext/oci8/tests/coll_002_func.phpt | 1 + ext/oci8/tests/coll_003.phpt | 1 + ext/oci8/tests/coll_003_func.phpt | 1 + ext/oci8/tests/coll_004.phpt | 1 + ext/oci8/tests/coll_004_func.phpt | 1 + ext/oci8/tests/coll_009.phpt | 1 + ext/oci8/tests/coll_009_func.phpt | 1 + ext/oci8/tests/coll_010.phpt | 1 + ext/oci8/tests/coll_010_func.phpt | 1 + ext/oci8/tests/coll_011.phpt | 1 + ext/oci8/tests/coll_011_func.phpt | 1 + ext/oci8/tests/coll_012.phpt | 1 + ext/oci8/tests/coll_012_func.phpt | 1 + ext/oci8/tests/coll_013.phpt | 1 + ext/oci8/tests/coll_013_func.phpt | 1 + ext/oci8/tests/coll_014.phpt | 1 + ext/oci8/tests/coll_014_func.phpt | 1 + ext/oci8/tests/coll_015.phpt | 1 + ext/oci8/tests/coll_015_func.phpt | 1 + ext/oci8/tests/coll_016.phpt | 1 + ext/oci8/tests/coll_016_func.phpt | 1 + ext/oci8/tests/coll_017.phpt | 1 + ext/oci8/tests/coll_017_func.phpt | 1 + ext/oci8/tests/coll_018.phpt | 1 + ext/oci8/tests/coll_019.phpt | 1 + ext/oci8/tests/commit_001.phpt | 1 + ext/oci8/tests/commit_002.phpt | 1 + ext/oci8/tests/conn_attr_1.phpt | 1 + ext/oci8/tests/conn_attr_2.phpt | 1 + ext/oci8/tests/conn_attr_3.phpt | 1 + ext/oci8/tests/conn_attr_4.phpt | 1 + ext/oci8/tests/conn_attr_5.phpt | 1 + ext/oci8/tests/connect.phpt | 4 +++ ext/oci8/tests/connect_1.phpt | 4 +++ ext/oci8/tests/connect_scope1.phpt | 4 +++ ext/oci8/tests/connect_scope2.phpt | 4 +++ ext/oci8/tests/connect_scope_try1.phpt | 4 +++ ext/oci8/tests/connect_scope_try2.phpt | 4 +++ ext/oci8/tests/connect_scope_try3.phpt | 4 +++ ext/oci8/tests/connect_scope_try4.phpt | 4 +++ ext/oci8/tests/connect_scope_try5.phpt | 4 +++ ext/oci8/tests/connect_scope_try6.phpt | 4 +++ ext/oci8/tests/connect_with_charset_001.phpt | 4 +++ .../tests/connect_without_oracle_home_11.phpt | 1 + ext/oci8/tests/cursor_bind.phpt | 1 + ext/oci8/tests/cursor_bind_err.phpt | 1 + ext/oci8/tests/cursors.phpt | 1 + ext/oci8/tests/db_op_1.phpt | 1 + ext/oci8/tests/db_op_2.phpt | 1 + ext/oci8/tests/dbmsoutput.phpt | 1 + ext/oci8/tests/default_prefetch0.phpt | 4 +++ ext/oci8/tests/default_prefetch1.phpt | 4 +++ ext/oci8/tests/default_prefetch2.phpt | 4 +++ ext/oci8/tests/define.phpt | 4 +++ ext/oci8/tests/define0.phpt | 4 +++ ext/oci8/tests/define1.phpt | 4 +++ ext/oci8/tests/define2.phpt | 1 + ext/oci8/tests/define3.phpt | 1 + ext/oci8/tests/define4.phpt | 4 +++ ext/oci8/tests/define5.phpt | 4 +++ ext/oci8/tests/define6.phpt | 1 + ext/oci8/tests/descriptors.phpt | 1 + ext/oci8/tests/drcp_cclass1.phpt | 1 + ext/oci8/tests/drcp_characterset.phpt | 4 +++ ext/oci8/tests/drcp_conn_close1.phpt | 4 +++ ext/oci8/tests/drcp_conn_close2.phpt | 4 +++ ext/oci8/tests/drcp_connect1.phpt | 1 + ext/oci8/tests/drcp_newconnect.phpt | 4 +++ ext/oci8/tests/drcp_pconn_close1.phpt | 4 +++ ext/oci8/tests/drcp_pconn_close2.phpt | 4 +++ ext/oci8/tests/drcp_privileged.phpt | 1 + ext/oci8/tests/drcp_scope1.phpt | 4 +++ ext/oci8/tests/drcp_scope2.phpt | 4 +++ ext/oci8/tests/drcp_scope3.phpt | 4 +++ ext/oci8/tests/drcp_scope4.phpt | 4 +++ ext/oci8/tests/drcp_scope5.phpt | 4 +++ ext/oci8/tests/driver_name.phpt | 4 ++- ext/oci8/tests/driver_name_11gR2.phpt | 4 ++- ext/oci8/tests/dupcolnames.phpt | 4 +++ ext/oci8/tests/edition_1.phpt | 1 + ext/oci8/tests/edition_2.phpt | 1 + ext/oci8/tests/error.phpt | 1 + ext/oci8/tests/error2.phpt | 1 + ext/oci8/tests/error3.phpt | 1 + ext/oci8/tests/error_bind.phpt | 4 +++ ext/oci8/tests/error_bind_2.phpt | 1 + ext/oci8/tests/error_bind_3.phpt | 1 + ext/oci8/tests/error_parse.phpt | 4 +++ ext/oci8/tests/error_set.phpt | 4 +++ ext/oci8/tests/exec_fetch.phpt | 4 +++ ext/oci8/tests/execute_mode.phpt | 4 +++ ext/oci8/tests/fetch.phpt | 4 +++ ext/oci8/tests/fetch_all1.phpt | 4 +++ ext/oci8/tests/fetch_all2.phpt | 1 + ext/oci8/tests/fetch_all3.phpt | 4 +++ ext/oci8/tests/fetch_all4.phpt | 4 +++ ext/oci8/tests/fetch_all5.phpt | 4 +++ ext/oci8/tests/fetch_array.phpt | 1 + ext/oci8/tests/fetch_assoc.phpt | 4 +++ ext/oci8/tests/fetch_object.phpt | 1 + ext/oci8/tests/fetch_object_1.phpt | 1 + ext/oci8/tests/fetch_object_2.phpt | 1 + ext/oci8/tests/fetch_row.phpt | 4 +++ ext/oci8/tests/field_funcs.phpt | 1 + ext/oci8/tests/field_funcs1.phpt | 4 +++ ext/oci8/tests/field_funcs2.phpt | 4 +++ ext/oci8/tests/field_funcs3.phpt | 4 +++ ext/oci8/tests/imp_res_1.phpt | 1 + ext/oci8/tests/imp_res_2.phpt | 1 + ext/oci8/tests/imp_res_3.phpt | 1 + ext/oci8/tests/imp_res_4.phpt | 1 + ext/oci8/tests/imp_res_5.phpt | 1 + ext/oci8/tests/imp_res_6.phpt | 1 + ext/oci8/tests/imp_res_7.phpt | 1 + ext/oci8/tests/imp_res_call_error.phpt | 1 + ext/oci8/tests/imp_res_cancel.phpt | 1 + ext/oci8/tests/imp_res_close.phpt | 1 + ext/oci8/tests/imp_res_cursor.phpt | 1 + ext/oci8/tests/imp_res_dbmsoutput.phpt | 1 + ext/oci8/tests/imp_res_field.phpt | 1 + ext/oci8/tests/imp_res_func_error.phpt | 1 + ext/oci8/tests/imp_res_get_1.phpt | 1 + ext/oci8/tests/imp_res_get_2.phpt | 1 + ext/oci8/tests/imp_res_get_3.phpt | 1 + ext/oci8/tests/imp_res_get_4.phpt | 1 + ext/oci8/tests/imp_res_get_5.phpt | 1 + ext/oci8/tests/imp_res_get_all.phpt | 1 + ext/oci8/tests/imp_res_get_cancel.phpt | 1 + ext/oci8/tests/imp_res_get_close_1.phpt | 1 + ext/oci8/tests/imp_res_get_close_2.phpt | 1 + ext/oci8/tests/imp_res_get_close_3.phpt | 1 + ext/oci8/tests/imp_res_get_cursor.phpt | 1 + ext/oci8/tests/imp_res_get_dbmsoutput.phpt | 1 + ext/oci8/tests/imp_res_get_exec.phpt | 1 + ext/oci8/tests/imp_res_get_none.phpt | 1 + ext/oci8/tests/imp_res_insert.phpt | 1 + ext/oci8/tests/imp_res_lob.phpt | 1 + ext/oci8/tests/imp_res_prefetch.phpt | 1 + ext/oci8/tests/lob_001.phpt | 1 + ext/oci8/tests/lob_002.phpt | 1 + ext/oci8/tests/lob_003.phpt | 1 + ext/oci8/tests/lob_004.phpt | 1 + ext/oci8/tests/lob_005.phpt | 1 + ext/oci8/tests/lob_006.phpt | 1 + ext/oci8/tests/lob_007.phpt | 1 + ext/oci8/tests/lob_008.phpt | 1 + ext/oci8/tests/lob_009.phpt | 1 + ext/oci8/tests/lob_010.phpt | 1 + ext/oci8/tests/lob_011.phpt | 1 + ext/oci8/tests/lob_012.phpt | 1 + ext/oci8/tests/lob_013.phpt | 1 + ext/oci8/tests/lob_014.phpt | 1 + ext/oci8/tests/lob_016.phpt | 1 + ext/oci8/tests/lob_017.phpt | 1 + ext/oci8/tests/lob_018.phpt | 1 + ext/oci8/tests/lob_019.phpt | 1 + ext/oci8/tests/lob_020.phpt | 1 + ext/oci8/tests/lob_021.phpt | 1 + ext/oci8/tests/lob_022.phpt | 1 + ext/oci8/tests/lob_023.phpt | 1 + ext/oci8/tests/lob_024.phpt | 1 + ext/oci8/tests/lob_025.phpt | 1 + ext/oci8/tests/lob_026.phpt | 1 + ext/oci8/tests/lob_027.phpt | 1 + ext/oci8/tests/lob_028.phpt | 1 + ext/oci8/tests/lob_029.phpt | 1 + ext/oci8/tests/lob_030.phpt | 1 + ext/oci8/tests/lob_031.phpt | 1 + ext/oci8/tests/lob_032.phpt | 1 + ext/oci8/tests/lob_033.phpt | 1 + ext/oci8/tests/lob_034.phpt | 1 + ext/oci8/tests/lob_035.phpt | 1 + ext/oci8/tests/lob_036.phpt | 1 + ext/oci8/tests/lob_037.phpt | 1 + ext/oci8/tests/lob_038.phpt | 1 + ext/oci8/tests/lob_039.phpt | 1 + ext/oci8/tests/lob_040.phpt | 1 + ext/oci8/tests/lob_041.phpt | 1 + ext/oci8/tests/lob_042.phpt | 1 + ext/oci8/tests/lob_043.phpt | 1 + ext/oci8/tests/lob_044.phpt | 1 + ext/oci8/tests/lob_aliases.phpt | 5 ---- ext/oci8/tests/lob_null.phpt | 1 + ext/oci8/tests/lob_prefetch.phpt | 1 + ext/oci8/tests/lob_prefetch_ini.phpt | 1 + ext/oci8/tests/lob_temp.phpt | 1 + ext/oci8/tests/lob_temp1.phpt | 1 + ext/oci8/tests/lob_temp2.phpt | 1 + ext/oci8/tests/null_byte_1.phpt | 1 + ext/oci8/tests/null_byte_2.phpt | 1 + ext/oci8/tests/null_byte_3.phpt | 4 +++ ext/oci8/tests/num.phpt | 4 +++ ext/oci8/tests/oci_execute_segfault.phpt | 1 + ext/oci8/tests/old_oci_close.phpt | 4 +++ ext/oci8/tests/old_oci_close1.phpt | 4 +++ ext/oci8/tests/password.phpt | 4 +-- ext/oci8/tests/password_2.phpt | 4 +-- ext/oci8/tests/password_new.phpt | 1 + ext/oci8/tests/pecl_bug10194.phpt | 1 + ext/oci8/tests/pecl_bug10194_blob.phpt | 1 + ext/oci8/tests/pecl_bug10194_blob_64.phpt | 1 + ext/oci8/tests/pecl_bug16842.phpt | 1 + ext/oci8/tests/pecl_bug6109.phpt | 4 +++ ext/oci8/tests/pecl_bug8816.phpt | 1 + ext/oci8/tests/persistent.phpt | 4 +++ ext/oci8/tests/prefetch.phpt | 4 +++ ext/oci8/tests/privileged_connect.phpt | 4 +++ ext/oci8/tests/privileged_connect1.phpt | 3 +- ext/oci8/tests/refcur_prefetch_1.phpt | 4 ++- ext/oci8/tests/refcur_prefetch_2.phpt | 4 ++- ext/oci8/tests/refcur_prefetch_3.phpt | 4 ++- ext/oci8/tests/refcur_prefetch_4.phpt | 4 ++- ext/oci8/tests/select_null.phpt | 4 +++ ext/oci8/tests/serverversion.phpt | 4 +++ ext/oci8/tests/skipifconnectfailure.inc | 29 +++++++++++++++++++ ext/oci8/tests/statement_cache.phpt | 1 + ext/oci8/tests/statement_type.phpt | 4 +++ ext/oci8/tests/testping.phpt | 4 +++ ext/oci8/tests/uncommitted.phpt | 4 +++ ext/oci8/tests/xmltype_01.phpt | 1 + ext/oci8/tests/xmltype_02.phpt | 1 + 319 files changed, 627 insertions(+), 18 deletions(-) create mode 100644 ext/oci8/tests/skipifconnectfailure.inc diff --git a/ext/oci8/tests/array_bind_001.phpt b/ext/oci8/tests/array_bind_001.phpt index 9cece0d790d8..13c000e35ddf 100644 --- a/ext/oci8/tests/array_bind_001.phpt +++ b/ext/oci8/tests/array_bind_001.phpt @@ -2,6 +2,10 @@ oci_bind_array_by_name() and invalid values 1 --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_004.phpt b/ext/oci8/tests/array_bind_004.phpt index 1bb6f9967b3c..aaae60ca7b1b 100644 --- a/ext/oci8/tests/array_bind_004.phpt +++ b/ext/oci8/tests/array_bind_004.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name() and invalid values 4 oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_005.phpt b/ext/oci8/tests/array_bind_005.phpt index d8e8de40733d..565a755b47bd 100644 --- a/ext/oci8/tests/array_bind_005.phpt +++ b/ext/oci8/tests/array_bind_005.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name() and invalid values 5 oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_006.phpt b/ext/oci8/tests/array_bind_006.phpt index c32702716142..6ef20ce5710a 100644 --- a/ext/oci8/tests/array_bind_006.phpt +++ b/ext/oci8/tests/array_bind_006.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name(), SQLT_CHR and default max_length oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_007.phpt b/ext/oci8/tests/array_bind_007.phpt index adf5f0a424bf..42cef8a781b9 100644 --- a/ext/oci8/tests/array_bind_007.phpt +++ b/ext/oci8/tests/array_bind_007.phpt @@ -2,6 +2,10 @@ oci_bind_array_by_name() and invalid values 7 --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_009.phpt b/ext/oci8/tests/array_bind_009.phpt index e205aaa9a9f1..8844a97632fe 100644 --- a/ext/oci8/tests/array_bind_009.phpt +++ b/ext/oci8/tests/array_bind_009.phpt @@ -2,6 +2,10 @@ oci_bind_array_by_name() and invalid values 9 --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_bdouble.phpt b/ext/oci8/tests/array_bind_bdouble.phpt index 7f94bbb8e921..8e9a90319f4f 100644 --- a/ext/oci8/tests/array_bind_bdouble.phpt +++ b/ext/oci8/tests/array_bind_bdouble.phpt @@ -4,6 +4,7 @@ Unsupported type: oci_bind_array_by_name() and SQLT_BDOUBLE oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (!defined('SQLT_BDOUBLE')) die('skip SQLT_BDOUBLE type not available on older Oracle clients'); diff --git a/ext/oci8/tests/array_bind_bfloat.phpt b/ext/oci8/tests/array_bind_bfloat.phpt index 5498edb5f1b4..902bd48e5fb2 100644 --- a/ext/oci8/tests/array_bind_bfloat.phpt +++ b/ext/oci8/tests/array_bind_bfloat.phpt @@ -4,6 +4,7 @@ Unsupported type: oci_bind_array_by_name() and SQLT_BFLOAT oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (!defined('SQLT_BFLOAT')) die('skip SQLT_BFLOAT type not available on older Oracle clients'); diff --git a/ext/oci8/tests/array_bind_date.phpt b/ext/oci8/tests/array_bind_date.phpt index 3969df376ea5..fb9320865cee 100644 --- a/ext/oci8/tests/array_bind_date.phpt +++ b/ext/oci8/tests/array_bind_date.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name() and SQLT_ODT oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_date1.phpt b/ext/oci8/tests/array_bind_date1.phpt index 8a56bc0c09b7..af1dc99dcc98 100644 --- a/ext/oci8/tests/array_bind_date1.phpt +++ b/ext/oci8/tests/array_bind_date1.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name() and SQLT_ODT oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_float.phpt b/ext/oci8/tests/array_bind_float.phpt index 588acec7d304..47e9da556282 100644 --- a/ext/oci8/tests/array_bind_float.phpt +++ b/ext/oci8/tests/array_bind_float.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name() and SQLT_FLT oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_float1.phpt b/ext/oci8/tests/array_bind_float1.phpt index 63b38679f630..1773299ddc5b 100644 --- a/ext/oci8/tests/array_bind_float1.phpt +++ b/ext/oci8/tests/array_bind_float1.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name() and SQLT_FLT oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_int.phpt b/ext/oci8/tests/array_bind_int.phpt index 9e1b27eb250d..e505207685c3 100644 --- a/ext/oci8/tests/array_bind_int.phpt +++ b/ext/oci8/tests/array_bind_int.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name() and SQLT_INT oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_int1.phpt b/ext/oci8/tests/array_bind_int1.phpt index 2d78378fb464..08392a24ccb0 100644 --- a/ext/oci8/tests/array_bind_int1.phpt +++ b/ext/oci8/tests/array_bind_int1.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name() and SQLT_INT oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_str.phpt b/ext/oci8/tests/array_bind_str.phpt index 2b00c9323e05..f22baf2df6ba 100644 --- a/ext/oci8/tests/array_bind_str.phpt +++ b/ext/oci8/tests/array_bind_str.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name() and SQLT_CHR oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_str1.phpt b/ext/oci8/tests/array_bind_str1.phpt index 498d9bb4de24..758bb36b5530 100644 --- a/ext/oci8/tests/array_bind_str1.phpt +++ b/ext/oci8/tests/array_bind_str1.phpt @@ -4,6 +4,7 @@ oci_bind_array_by_name() and SQLT_CHR oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/array_bind_uin.phpt b/ext/oci8/tests/array_bind_uin.phpt index b628186dc519..f975dcd82bff 100644 --- a/ext/oci8/tests/array_bind_uin.phpt +++ b/ext/oci8/tests/array_bind_uin.phpt @@ -4,6 +4,7 @@ Unsupported type: oci_bind_array_by_name() and SQLT_UIN oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/b47243_1.phpt b/ext/oci8/tests/b47243_1.phpt index 7cbb35974380..cdf8878f2637 100644 --- a/ext/oci8/tests/b47243_1.phpt +++ b/ext/oci8/tests/b47243_1.phpt @@ -4,6 +4,7 @@ Bug #47243 (Crash on exit with ZTS mode) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/b47243_2.phpt b/ext/oci8/tests/b47243_2.phpt index 557f30ac4803..1fe92fa6743b 100644 --- a/ext/oci8/tests/b47243_2.phpt +++ b/ext/oci8/tests/b47243_2.phpt @@ -4,6 +4,7 @@ Bug #47243 (Crash on exit with ZTS mode) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/b47243_3.phpt b/ext/oci8/tests/b47243_3.phpt index d82f5396e98e..82b98b06b475 100644 --- a/ext/oci8/tests/b47243_3.phpt +++ b/ext/oci8/tests/b47243_3.phpt @@ -4,6 +4,7 @@ Bug #47243 (Crash on exit with ZTS mode) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bind_boolean_1.phpt b/ext/oci8/tests/bind_boolean_1.phpt index 49286401ef69..caa7fd4bdc1b 100644 --- a/ext/oci8/tests/bind_boolean_1.phpt +++ b/ext/oci8/tests/bind_boolean_1.phpt @@ -4,6 +4,7 @@ Basic PL/SQL "BOOLEAN" (SQLT_BOL) bind test oci8 --SKIPIF-- = 12)) { diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt index 52d97ce2a435..57705d72bf0d 100644 --- a/ext/oci8/tests/bind_char_1.phpt +++ b/ext/oci8/tests/bind_char_1.phpt @@ -4,6 +4,7 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR oci8 --SKIPIF-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bind_long_raw.phpt b/ext/oci8/tests/bind_long_raw.phpt index 0fa7261623d4..bba5afe86965 100644 --- a/ext/oci8/tests/bind_long_raw.phpt +++ b/ext/oci8/tests/bind_long_raw.phpt @@ -4,6 +4,7 @@ bind LONG RAW field oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bind_misccoltypes.phpt b/ext/oci8/tests/bind_misccoltypes.phpt index e62823e95e39..958ad7baf137 100644 --- a/ext/oci8/tests/bind_misccoltypes.phpt +++ b/ext/oci8/tests/bind_misccoltypes.phpt @@ -4,6 +4,7 @@ Bind miscellaneous column types using default types oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bind_misccoltypes_errs.phpt b/ext/oci8/tests/bind_misccoltypes_errs.phpt index 9233b7da5d13..260a6a6863d2 100644 --- a/ext/oci8/tests/bind_misccoltypes_errs.phpt +++ b/ext/oci8/tests/bind_misccoltypes_errs.phpt @@ -2,6 +2,10 @@ Bind miscellaneous column types and generating errors --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --INI-- precision = 14 --FILE-- diff --git a/ext/oci8/tests/bind_query.phpt b/ext/oci8/tests/bind_query.phpt index b0622ed42961..0a11c4102a4a 100644 --- a/ext/oci8/tests/bind_query.phpt +++ b/ext/oci8/tests/bind_query.phpt @@ -2,6 +2,10 @@ Bind with various WHERE conditions --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bind_raw_2.phpt b/ext/oci8/tests/bind_raw_2.phpt index eecb69439fb4..525f5a36ff4d 100644 --- a/ext/oci8/tests/bind_raw_2.phpt +++ b/ext/oci8/tests/bind_raw_2.phpt @@ -4,6 +4,7 @@ bind RAW field with OCI_B_BIN oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bind_rowid.phpt b/ext/oci8/tests/bind_rowid.phpt index b354e43a0831..de4589407bc8 100644 --- a/ext/oci8/tests/bind_rowid.phpt +++ b/ext/oci8/tests/bind_rowid.phpt @@ -2,6 +2,10 @@ Test ROWID bind --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- = 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); diff --git a/ext/oci8/tests/bind_unsupported_1.phpt b/ext/oci8/tests/bind_unsupported_1.phpt index d856d020d791..c78a97780ef7 100644 --- a/ext/oci8/tests/bind_unsupported_1.phpt +++ b/ext/oci8/tests/bind_unsupported_1.phpt @@ -2,6 +2,10 @@ Bind with various unsupported bind types --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- false, 'timesten' => true); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug26133.phpt b/ext/oci8/tests/bug26133.phpt index a96bf1a7d2d9..cc61e3e89f90 100644 --- a/ext/oci8/tests/bug26133.phpt +++ b/ext/oci8/tests/bug26133.phpt @@ -2,6 +2,10 @@ Bug #26133 (ocifreedesc() segfault) --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug35973.phpt b/ext/oci8/tests/bug35973.phpt index c63381017298..91df0fe77de6 100644 --- a/ext/oci8/tests/bug35973.phpt +++ b/ext/oci8/tests/bug35973.phpt @@ -4,6 +4,7 @@ Bug #35973 (Error ORA-24806 occurs when trying to fetch a NCLOB field) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug36010.phpt b/ext/oci8/tests/bug36010.phpt index 1e5ec1c6e5b3..2ec64dbf8783 100644 --- a/ext/oci8/tests/bug36010.phpt +++ b/ext/oci8/tests/bug36010.phpt @@ -4,6 +4,7 @@ Bug #36010 (Crash when executing SQL statement with lob parameter twice) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug36096.phpt b/ext/oci8/tests/bug36096.phpt index 9532ec9b0f6d..8a0f63850afe 100644 --- a/ext/oci8/tests/bug36096.phpt +++ b/ext/oci8/tests/bug36096.phpt @@ -2,6 +2,10 @@ Bug #36096 (oci_result() returns garbage after oci_fetch() failed) --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug37581.phpt b/ext/oci8/tests/bug37581.phpt index 74a22e284758..1ff2552f22ad 100644 --- a/ext/oci8/tests/bug37581.phpt +++ b/ext/oci8/tests/bug37581.phpt @@ -4,6 +4,7 @@ Bug #37581 (oci_bind_array_by_name clobbers input array when using SQLT_AFC, AVC oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug38161.phpt b/ext/oci8/tests/bug38161.phpt index 85ef80e824c2..68ab1c8f5ddc 100644 --- a/ext/oci8/tests/bug38161.phpt +++ b/ext/oci8/tests/bug38161.phpt @@ -2,6 +2,10 @@ Bug #38161 (oci_bind_by_name() returns garbage when Oracle didn't set the variable) --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug40078.phpt b/ext/oci8/tests/bug40078.phpt index c50efae01105..d79402c85a1e 100644 --- a/ext/oci8/tests/bug40078.phpt +++ b/ext/oci8/tests/bug40078.phpt @@ -4,6 +4,7 @@ Bug #40078 (ORA-01405 when fetching NULL values using oci_bind_array_by_name()) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug40415.phpt b/ext/oci8/tests/bug40415.phpt index 93ab60241186..0debb9dc2308 100644 --- a/ext/oci8/tests/bug40415.phpt +++ b/ext/oci8/tests/bug40415.phpt @@ -4,6 +4,7 @@ Bug #40415 (Using oci_fetchall with nested cursors) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug41069.phpt b/ext/oci8/tests/bug41069.phpt index d72192b12e64..d8ab1911e663 100644 --- a/ext/oci8/tests/bug41069.phpt +++ b/ext/oci8/tests/bug41069.phpt @@ -4,6 +4,7 @@ Bug #41069 (Oracle crash with certain data over a DB-link when prefetch memory l oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (empty($dbase)) die ("skip requires network connection alias for DB link loopback"); diff --git a/ext/oci8/tests/bug42134.phpt b/ext/oci8/tests/bug42134.phpt index 2e134d06d82c..374aa5816aed 100644 --- a/ext/oci8/tests/bug42134.phpt +++ b/ext/oci8/tests/bug42134.phpt @@ -4,6 +4,7 @@ Bug #42134 (Collection error for invalid collection name) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug42173.phpt b/ext/oci8/tests/bug42173.phpt index 83021346559e..4ed59dcab7ad 100644 --- a/ext/oci8/tests/bug42173.phpt +++ b/ext/oci8/tests/bug42173.phpt @@ -4,6 +4,7 @@ Bug #42173 (TIMESTAMP and INTERVAL query and field functions) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug42496_1.phpt b/ext/oci8/tests/bug42496_1.phpt index a83f4a0ee6c2..e52f3fe71578 100644 --- a/ext/oci8/tests/bug42496_1.phpt +++ b/ext/oci8/tests/bug42496_1.phpt @@ -4,9 +4,10 @@ Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum op oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); -if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); -if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug43492.phpt b/ext/oci8/tests/bug43492.phpt index b0d8e77e2f57..311a0cab8a75 100644 --- a/ext/oci8/tests/bug43492.phpt +++ b/ext/oci8/tests/bug43492.phpt @@ -4,6 +4,7 @@ Bug #43492 (Nested cursor leaks) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug43492_2.phpt b/ext/oci8/tests/bug43492_2.phpt index 1ea30fcaaf0b..67206eb9f5f6 100644 --- a/ext/oci8/tests/bug43492_2.phpt +++ b/ext/oci8/tests/bug43492_2.phpt @@ -4,6 +4,7 @@ Bug #43492 (Nested cursor leaks after related bug #44206 fixed) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug43497.phpt b/ext/oci8/tests/bug43497.phpt index 572568d57e92..22c1ae0c9bd1 100644 --- a/ext/oci8/tests/bug43497.phpt +++ b/ext/oci8/tests/bug43497.phpt @@ -4,6 +4,7 @@ Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); diff --git a/ext/oci8/tests/bug44008.phpt b/ext/oci8/tests/bug44008.phpt index 6f1a860b8c03..e8bd9d518944 100644 --- a/ext/oci8/tests/bug44008.phpt +++ b/ext/oci8/tests/bug44008.phpt @@ -4,6 +4,7 @@ Bug #44008 (Incorrect usage of OCILob->close crashes PHP) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug44113.phpt b/ext/oci8/tests/bug44113.phpt index 916d67a87cd9..c2932341eb04 100644 --- a/ext/oci8/tests/bug44113.phpt +++ b/ext/oci8/tests/bug44113.phpt @@ -4,6 +4,7 @@ Bug #44113 (New collection creation can fail with OCI-22303) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); diff --git a/ext/oci8/tests/bug44206.phpt b/ext/oci8/tests/bug44206.phpt index 53aa2b19d858..b9d57072724f 100644 --- a/ext/oci8/tests/bug44206.phpt +++ b/ext/oci8/tests/bug44206.phpt @@ -4,6 +4,7 @@ Bug #44206 (Test if selecting ref cursors leads to ORA-1000 maximum open cursors oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug45458.phpt b/ext/oci8/tests/bug45458.phpt index 102742d08ba9..cb60435e88a1 100644 --- a/ext/oci8/tests/bug45458.phpt +++ b/ext/oci8/tests/bug45458.phpt @@ -2,6 +2,10 @@ Bug #45458 (OCI8: Numeric keys for associative arrays are not handled properly) --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug47189.phpt b/ext/oci8/tests/bug47189.phpt index 3a4ed05cbfe8..edcac941dab1 100644 --- a/ext/oci8/tests/bug47189.phpt +++ b/ext/oci8/tests/bug47189.phpt @@ -4,6 +4,7 @@ Bug #47189 (Multiple oci_fetch_all calls) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs: different error handling for this undefined behavior require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug47281.phpt b/ext/oci8/tests/bug47281.phpt index 260826b2ecb1..1ee63f646fea 100644 --- a/ext/oci8/tests/bug47281.phpt +++ b/ext/oci8/tests/bug47281.phpt @@ -4,6 +4,7 @@ Bug #47281 ($php_errormsg is limited in size of characters) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); // error3.phpt obsoletes this test for newer Oracle client versions diff --git a/ext/oci8/tests/bug47281_tt.phpt b/ext/oci8/tests/bug47281_tt.phpt index a1cfa01bd986..d860c784195d 100644 --- a/ext/oci8/tests/bug47281_tt.phpt +++ b/ext/oci8/tests/bug47281_tt.phpt @@ -4,6 +4,7 @@ Bug #47281 ($php_errormsg is limited in size of characters) oci8 --SKIPIF-- false, 'timesten' => true); // test runs on these DBs: shorter message length in TimesTen require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug51253.phpt b/ext/oci8/tests/bug51253.phpt index 772cc7c2d641..b5d673597a77 100644 --- a/ext/oci8/tests/bug51253.phpt +++ b/ext/oci8/tests/bug51253.phpt @@ -4,6 +4,7 @@ Bug #51253 (oci_bind_array_by_name() array references) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug51291_1.phpt b/ext/oci8/tests/bug51291_1.phpt index 47aff5b4a773..966f0d867a87 100644 --- a/ext/oci8/tests/bug51291_1.phpt +++ b/ext/oci8/tests/bug51291_1.phpt @@ -2,6 +2,10 @@ Bug #51291 (oci_error() doesn't report last error when called two times) --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug68298.phpt b/ext/oci8/tests/bug68298.phpt index 77a919ba4d04..34674c39b39e 100644 --- a/ext/oci8/tests/bug68298.phpt +++ b/ext/oci8/tests/bug68298.phpt @@ -5,6 +5,7 @@ oci8 --SKIPIF-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug71148.phpt b/ext/oci8/tests/bug71148.phpt index 43fa3f8a0c64..b1c6bb1442a4 100644 --- a/ext/oci8/tests/bug71148.phpt +++ b/ext/oci8/tests/bug71148.phpt @@ -4,6 +4,7 @@ Bug #71448 (Binding reference overwritten on php7) oci8 --SKIPIF-- true, 'timesten' => true); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug71422.phpt b/ext/oci8/tests/bug71422.phpt index ea946b811f3d..c53b3e38a7b5 100644 --- a/ext/oci8/tests/bug71422.phpt +++ b/ext/oci8/tests/bug71422.phpt @@ -2,6 +2,10 @@ Bug #71422 (Fix ORA-01438: value larger than specified precision allowed for this column) --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => true); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug72524.phpt b/ext/oci8/tests/bug72524.phpt index 88ad613f6f50..ad355f9cc49d 100644 --- a/ext/oci8/tests/bug72524.phpt +++ b/ext/oci8/tests/bug72524.phpt @@ -4,6 +4,7 @@ Bug #72524 (Binding null values triggers ORA-24816 error) oci8 --SKIPIF-- true, 'timesten' => true); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/bug74625.phpt b/ext/oci8/tests/bug74625.phpt index 8e49428119c4..254fb780b7bc 100644 --- a/ext/oci8/tests/bug74625.phpt +++ b/ext/oci8/tests/bug74625.phpt @@ -2,6 +2,10 @@ Bug #74625 (Integer overflow in oci_bind_array_by_name) --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { diff --git a/ext/oci8/tests/close.phpt b/ext/oci8/tests/close.phpt index fe8d724686a8..82f4452db35c 100644 --- a/ext/oci8/tests/close.phpt +++ b/ext/oci8/tests/close.phpt @@ -2,6 +2,10 @@ connect/close/connect --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_002.phpt b/ext/oci8/tests/coll_002.phpt index a7e7b7f1cd27..e576d4111e51 100644 --- a/ext/oci8/tests/coll_002.phpt +++ b/ext/oci8/tests/coll_002.phpt @@ -4,6 +4,7 @@ oci_new_collection() + free() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_002_func.phpt b/ext/oci8/tests/coll_002_func.phpt index 24e4e3872a65..414d4ea5989c 100644 --- a/ext/oci8/tests/coll_002_func.phpt +++ b/ext/oci8/tests/coll_002_func.phpt @@ -4,6 +4,7 @@ oci_new_collection() + free() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_003.phpt b/ext/oci8/tests/coll_003.phpt index 126a7771da88..a846c6d1e14d 100644 --- a/ext/oci8/tests/coll_003.phpt +++ b/ext/oci8/tests/coll_003.phpt @@ -4,6 +4,7 @@ collection methods oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_003_func.phpt b/ext/oci8/tests/coll_003_func.phpt index 4826ac08eed8..3f6a3a4a604e 100644 --- a/ext/oci8/tests/coll_003_func.phpt +++ b/ext/oci8/tests/coll_003_func.phpt @@ -4,6 +4,7 @@ collection methods oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_004.phpt b/ext/oci8/tests/coll_004.phpt index f35a2cebecd5..3b4bc3f07e12 100644 --- a/ext/oci8/tests/coll_004.phpt +++ b/ext/oci8/tests/coll_004.phpt @@ -4,6 +4,7 @@ oci_collection_assign() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_004_func.phpt b/ext/oci8/tests/coll_004_func.phpt index f97b56dc5c97..d86cd8d16cdc 100644 --- a/ext/oci8/tests/coll_004_func.phpt +++ b/ext/oci8/tests/coll_004_func.phpt @@ -4,6 +4,7 @@ oci_collection_assign() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_009.phpt b/ext/oci8/tests/coll_009.phpt index 3944688a9769..4cb3d1dd6ebf 100644 --- a/ext/oci8/tests/coll_009.phpt +++ b/ext/oci8/tests/coll_009.phpt @@ -4,6 +4,7 @@ collections and wrong dates oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_009_func.phpt b/ext/oci8/tests/coll_009_func.phpt index a37f7236a316..16ee09d83bfd 100644 --- a/ext/oci8/tests/coll_009_func.phpt +++ b/ext/oci8/tests/coll_009_func.phpt @@ -4,6 +4,7 @@ collections and wrong dates oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_010.phpt b/ext/oci8/tests/coll_010.phpt index 0fc003ed57fb..032e3efb495d 100644 --- a/ext/oci8/tests/coll_010.phpt +++ b/ext/oci8/tests/coll_010.phpt @@ -4,6 +4,7 @@ collections and nulls oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_010_func.phpt b/ext/oci8/tests/coll_010_func.phpt index d6b3cdc26c53..19714abb5b9a 100644 --- a/ext/oci8/tests/coll_010_func.phpt +++ b/ext/oci8/tests/coll_010_func.phpt @@ -4,6 +4,7 @@ collections and nulls oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_011.phpt b/ext/oci8/tests/coll_011.phpt index 5e3e2c108683..ac07a51f73af 100644 --- a/ext/oci8/tests/coll_011.phpt +++ b/ext/oci8/tests/coll_011.phpt @@ -4,6 +4,7 @@ collections and strings oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_011_func.phpt b/ext/oci8/tests/coll_011_func.phpt index 5c3e94ee4b66..2274208137e1 100644 --- a/ext/oci8/tests/coll_011_func.phpt +++ b/ext/oci8/tests/coll_011_func.phpt @@ -4,6 +4,7 @@ collections and strings oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_012.phpt b/ext/oci8/tests/coll_012.phpt index 7b0305430367..3717e2ab1855 100644 --- a/ext/oci8/tests/coll_012.phpt +++ b/ext/oci8/tests/coll_012.phpt @@ -4,6 +4,7 @@ collections and correct dates oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_012_func.phpt b/ext/oci8/tests/coll_012_func.phpt index 68c46f5fe5ca..2588e31d8bd2 100644 --- a/ext/oci8/tests/coll_012_func.phpt +++ b/ext/oci8/tests/coll_012_func.phpt @@ -4,6 +4,7 @@ collections and correct dates oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_013.phpt b/ext/oci8/tests/coll_013.phpt index afc50fc8fa97..72d9f6eb7b38 100644 --- a/ext/oci8/tests/coll_013.phpt +++ b/ext/oci8/tests/coll_013.phpt @@ -4,6 +4,7 @@ collections and correct dates (2) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_013_func.phpt b/ext/oci8/tests/coll_013_func.phpt index c6264e8666b2..1dd76dabc054 100644 --- a/ext/oci8/tests/coll_013_func.phpt +++ b/ext/oci8/tests/coll_013_func.phpt @@ -4,6 +4,7 @@ collections and correct dates (2) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_014.phpt b/ext/oci8/tests/coll_014.phpt index 3dcb59781515..82e3d5082bfc 100644 --- a/ext/oci8/tests/coll_014.phpt +++ b/ext/oci8/tests/coll_014.phpt @@ -4,6 +4,7 @@ collections and strings (2) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_014_func.phpt b/ext/oci8/tests/coll_014_func.phpt index 164a2f9ca1c4..4309b07ae2f4 100644 --- a/ext/oci8/tests/coll_014_func.phpt +++ b/ext/oci8/tests/coll_014_func.phpt @@ -4,6 +4,7 @@ collections and strings (2) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_015.phpt b/ext/oci8/tests/coll_015.phpt index e7a103360ed8..77f5d0858d80 100644 --- a/ext/oci8/tests/coll_015.phpt +++ b/ext/oci8/tests/coll_015.phpt @@ -4,6 +4,7 @@ collections and numbers (2) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_015_func.phpt b/ext/oci8/tests/coll_015_func.phpt index 9d436f9233d0..718b2e10cd85 100644 --- a/ext/oci8/tests/coll_015_func.phpt +++ b/ext/oci8/tests/coll_015_func.phpt @@ -4,6 +4,7 @@ collections and numbers (2) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_016.phpt b/ext/oci8/tests/coll_016.phpt index 6fbfc5a468f0..5c23d8a67108 100644 --- a/ext/oci8/tests/coll_016.phpt +++ b/ext/oci8/tests/coll_016.phpt @@ -4,6 +4,7 @@ collections and negative/too big element indexes oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_016_func.phpt b/ext/oci8/tests/coll_016_func.phpt index 7dcc3eebc294..26f72c870131 100644 --- a/ext/oci8/tests/coll_016_func.phpt +++ b/ext/oci8/tests/coll_016_func.phpt @@ -4,6 +4,7 @@ collections and negative/too big element indexes oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_017.phpt b/ext/oci8/tests/coll_017.phpt index 140f6ee71589..651866a17a19 100644 --- a/ext/oci8/tests/coll_017.phpt +++ b/ext/oci8/tests/coll_017.phpt @@ -4,6 +4,7 @@ collections and nulls (2) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_017_func.phpt b/ext/oci8/tests/coll_017_func.phpt index 68097456ade2..a5d750966cdf 100644 --- a/ext/oci8/tests/coll_017_func.phpt +++ b/ext/oci8/tests/coll_017_func.phpt @@ -4,6 +4,7 @@ collections and nulls (2) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_018.phpt b/ext/oci8/tests/coll_018.phpt index 543240fa03a2..4ca39a6dc133 100644 --- a/ext/oci8/tests/coll_018.phpt +++ b/ext/oci8/tests/coll_018.phpt @@ -4,6 +4,7 @@ Collection trim tests oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/coll_019.phpt b/ext/oci8/tests/coll_019.phpt index 2912b8e0a776..a2e795914520 100644 --- a/ext/oci8/tests/coll_019.phpt +++ b/ext/oci8/tests/coll_019.phpt @@ -4,6 +4,7 @@ Test collection Oracle error handling collections and numbers (2) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/commit_001.phpt b/ext/oci8/tests/commit_001.phpt index 9de681812e0e..9ace8582dd51 100644 --- a/ext/oci8/tests/commit_001.phpt +++ b/ext/oci8/tests/commit_001.phpt @@ -4,6 +4,7 @@ Test OCI_NO_AUTO_COMMIT constant oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/commit_002.phpt b/ext/oci8/tests/commit_002.phpt index 93b77a9ee91c..fb6d3cf6c4d1 100644 --- a/ext/oci8/tests/commit_002.phpt +++ b/ext/oci8/tests/commit_002.phpt @@ -4,6 +4,7 @@ Test oci_commit failure oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/conn_attr_1.phpt b/ext/oci8/tests/conn_attr_1.phpt index a711ab6ccde6..d640db1bfefe 100644 --- a/ext/oci8/tests/conn_attr_1.phpt +++ b/ext/oci8/tests/conn_attr_1.phpt @@ -5,6 +5,7 @@ oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); diff --git a/ext/oci8/tests/conn_attr_2.phpt b/ext/oci8/tests/conn_attr_2.phpt index 2473eaefaa96..9133621e95ee 100644 --- a/ext/oci8/tests/conn_attr_2.phpt +++ b/ext/oci8/tests/conn_attr_2.phpt @@ -5,6 +5,7 @@ oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); diff --git a/ext/oci8/tests/conn_attr_3.phpt b/ext/oci8/tests/conn_attr_3.phpt index 625f24002b97..e391f2c6d655 100644 --- a/ext/oci8/tests/conn_attr_3.phpt +++ b/ext/oci8/tests/conn_attr_3.phpt @@ -5,6 +5,7 @@ oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index 6e92e85a9e7f..e01a99bebc41 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -4,6 +4,7 @@ Set and get of connection attributes with errors. oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); diff --git a/ext/oci8/tests/conn_attr_5.phpt b/ext/oci8/tests/conn_attr_5.phpt index 74ae75e301e0..5b7a348dbef1 100644 --- a/ext/oci8/tests/conn_attr_5.phpt +++ b/ext/oci8/tests/conn_attr_5.phpt @@ -5,6 +5,7 @@ oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); diff --git a/ext/oci8/tests/connect.phpt b/ext/oci8/tests/connect.phpt index 768f6aa4dc10..cb414cbd6056 100644 --- a/ext/oci8/tests/connect.phpt +++ b/ext/oci8/tests/connect.phpt @@ -2,6 +2,10 @@ oci_connect() --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --INI-- oci8.old_oci_close_semantics=0 --FILE-- diff --git a/ext/oci8/tests/connect_scope_try2.phpt b/ext/oci8/tests/connect_scope_try2.phpt index c73d9c27f0c8..efa91220f294 100644 --- a/ext/oci8/tests/connect_scope_try2.phpt +++ b/ext/oci8/tests/connect_scope_try2.phpt @@ -2,6 +2,10 @@ Check oci_connect try/catch end-of-scope with old_oci_close_semantics On --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=1 --FILE-- diff --git a/ext/oci8/tests/connect_scope_try3.phpt b/ext/oci8/tests/connect_scope_try3.phpt index 9c176dcd22a2..cb63c8410b48 100644 --- a/ext/oci8/tests/connect_scope_try3.phpt +++ b/ext/oci8/tests/connect_scope_try3.phpt @@ -2,6 +2,10 @@ Check oci_new_connect try/catch end-of-scope with old_oci_close_semantics Off --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=0 --FILE-- diff --git a/ext/oci8/tests/connect_scope_try4.phpt b/ext/oci8/tests/connect_scope_try4.phpt index b02be2c807a5..4c17a75c7792 100644 --- a/ext/oci8/tests/connect_scope_try4.phpt +++ b/ext/oci8/tests/connect_scope_try4.phpt @@ -2,6 +2,10 @@ Check oci_new_connect try/catch end-of-scope with old_oci_close_semantics On --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=1 --FILE-- diff --git a/ext/oci8/tests/connect_scope_try5.phpt b/ext/oci8/tests/connect_scope_try5.phpt index 42976a1bac18..021ee5bb11d8 100644 --- a/ext/oci8/tests/connect_scope_try5.phpt +++ b/ext/oci8/tests/connect_scope_try5.phpt @@ -2,6 +2,10 @@ Check oci_pconnect try/catch end-of-scope with old_oci_close_semantics Off --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=0 --FILE-- diff --git a/ext/oci8/tests/connect_scope_try6.phpt b/ext/oci8/tests/connect_scope_try6.phpt index 0a5299f59f2e..215f1c03cfea 100644 --- a/ext/oci8/tests/connect_scope_try6.phpt +++ b/ext/oci8/tests/connect_scope_try6.phpt @@ -2,6 +2,10 @@ Check oci_pconnect try/catch end-of-scope with old_oci_close_semantics On --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=1 --FILE-- diff --git a/ext/oci8/tests/connect_with_charset_001.phpt b/ext/oci8/tests/connect_with_charset_001.phpt index 059a23a539f8..4cc9051274de 100644 --- a/ext/oci8/tests/connect_with_charset_001.phpt +++ b/ext/oci8/tests/connect_with_charset_001.phpt @@ -2,6 +2,10 @@ oci_connect() with invalid character set --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/cursor_bind_err.phpt b/ext/oci8/tests/cursor_bind_err.phpt index 7cd852163667..533b897d639f 100644 --- a/ext/oci8/tests/cursor_bind_err.phpt +++ b/ext/oci8/tests/cursor_bind_err.phpt @@ -4,6 +4,7 @@ binding a cursor (with errors) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/cursors.phpt b/ext/oci8/tests/cursors.phpt index b6eeb3cf30f2..258d2f4ba39f 100644 --- a/ext/oci8/tests/cursors.phpt +++ b/ext/oci8/tests/cursors.phpt @@ -4,6 +4,7 @@ fetching cursor from a statement oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/db_op_1.phpt b/ext/oci8/tests/db_op_1.phpt index 69d4648a313d..7fcee5fe8bcc 100644 --- a/ext/oci8/tests/db_op_1.phpt +++ b/ext/oci8/tests/db_op_1.phpt @@ -4,6 +4,7 @@ oci_set_db_operation: basic test for end-to-end tracing oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { diff --git a/ext/oci8/tests/db_op_2.phpt b/ext/oci8/tests/db_op_2.phpt index 6d85bc1e0311..e6eedef30b0f 100644 --- a/ext/oci8/tests/db_op_2.phpt +++ b/ext/oci8/tests/db_op_2.phpt @@ -4,6 +4,7 @@ oci_set_db_operation: test DBOP for end-to-end tracing oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { diff --git a/ext/oci8/tests/dbmsoutput.phpt b/ext/oci8/tests/dbmsoutput.phpt index 8f8bf212e8f1..de7627fb7e60 100644 --- a/ext/oci8/tests/dbmsoutput.phpt +++ b/ext/oci8/tests/dbmsoutput.phpt @@ -4,6 +4,7 @@ PL/SQL: dbms_output oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/default_prefetch0.phpt b/ext/oci8/tests/default_prefetch0.phpt index 9c1804166eaa..a3a9ebf8a6d7 100644 --- a/ext/oci8/tests/default_prefetch0.phpt +++ b/ext/oci8/tests/default_prefetch0.phpt @@ -2,6 +2,10 @@ oci8.default_prefetch ini option --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.default_prefetch=20 --FILE-- diff --git a/ext/oci8/tests/default_prefetch1.phpt b/ext/oci8/tests/default_prefetch1.phpt index b379b1bcb6d3..fb5ac9b0eab6 100644 --- a/ext/oci8/tests/default_prefetch1.phpt +++ b/ext/oci8/tests/default_prefetch1.phpt @@ -2,6 +2,10 @@ oci8.default_prefetch ini option --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.default_prefetch=100 --FILE-- diff --git a/ext/oci8/tests/default_prefetch2.phpt b/ext/oci8/tests/default_prefetch2.phpt index 504d77f70984..abad815b1faa 100644 --- a/ext/oci8/tests/default_prefetch2.phpt +++ b/ext/oci8/tests/default_prefetch2.phpt @@ -2,6 +2,10 @@ oci8.default_prefetch ini option --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.default_prefetch=100 --FILE-- diff --git a/ext/oci8/tests/define.phpt b/ext/oci8/tests/define.phpt index 77745e97dbd8..17ff95085dd9 100644 --- a/ext/oci8/tests/define.phpt +++ b/ext/oci8/tests/define.phpt @@ -2,6 +2,10 @@ oci_define_by_name() --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/define3.phpt b/ext/oci8/tests/define3.phpt index f3d71d882e8e..0691f31c1d4b 100644 --- a/ext/oci8/tests/define3.phpt +++ b/ext/oci8/tests/define3.phpt @@ -4,6 +4,7 @@ Test oci_define_by_name() LOB descriptor oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/define4.phpt b/ext/oci8/tests/define4.phpt index 6311d32d26ff..e36097dc04c4 100644 --- a/ext/oci8/tests/define4.phpt +++ b/ext/oci8/tests/define4.phpt @@ -2,6 +2,10 @@ oci_define_by_name() on partial number of columns --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/descriptors.phpt b/ext/oci8/tests/descriptors.phpt index c928d9a27066..4d8730c6f359 100644 --- a/ext/oci8/tests/descriptors.phpt +++ b/ext/oci8/tests/descriptors.phpt @@ -4,6 +4,7 @@ commit connection after destroying the descriptor oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/drcp_cclass1.phpt b/ext/oci8/tests/drcp_cclass1.phpt index 5a557bb29858..37901db29c69 100644 --- a/ext/oci8/tests/drcp_cclass1.phpt +++ b/ext/oci8/tests/drcp_cclass1.phpt @@ -4,6 +4,7 @@ DRCP: Test setting connection class inline oci8 --SKIPIF-- --FILE-- --INI-- oci8.old_oci_close_semantics=1 oci8.connection_class=test diff --git a/ext/oci8/tests/drcp_conn_close2.phpt b/ext/oci8/tests/drcp_conn_close2.phpt index 8697905a433c..3c9cc89f8a4b 100644 --- a/ext/oci8/tests/drcp_conn_close2.phpt +++ b/ext/oci8/tests/drcp_conn_close2.phpt @@ -2,6 +2,10 @@ DRCP: oci_connect() with oci_close() and oci8.old_oci_close_semantics OFF --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=0 oci8.connection_class=test diff --git a/ext/oci8/tests/drcp_connect1.phpt b/ext/oci8/tests/drcp_connect1.phpt index f44aa8cc891d..ea4ec1b9ed1d 100644 --- a/ext/oci8/tests/drcp_connect1.phpt +++ b/ext/oci8/tests/drcp_connect1.phpt @@ -4,6 +4,7 @@ DRCP: oci_connect() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs (Calling PL/SQL from SQL is not supported in TimesTen) require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/drcp_newconnect.phpt b/ext/oci8/tests/drcp_newconnect.phpt index 8b939beead44..04c8bc83fd98 100644 --- a/ext/oci8/tests/drcp_newconnect.phpt +++ b/ext/oci8/tests/drcp_newconnect.phpt @@ -2,6 +2,10 @@ DRCP: oci_new_connect() --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.connection_class=test oci8.old_oci_close_semantics=0 diff --git a/ext/oci8/tests/drcp_pconn_close1.phpt b/ext/oci8/tests/drcp_pconn_close1.phpt index c53a002b5cc8..4d4557b5d5e9 100644 --- a/ext/oci8/tests/drcp_pconn_close1.phpt +++ b/ext/oci8/tests/drcp_pconn_close1.phpt @@ -2,6 +2,10 @@ DRCP: oci_pconnect() with oci_close() and oci8.old_oci_close_semantics ON --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=1 oci8.connection_class=test diff --git a/ext/oci8/tests/drcp_pconn_close2.phpt b/ext/oci8/tests/drcp_pconn_close2.phpt index bfbf383bac5a..a153764f59fb 100644 --- a/ext/oci8/tests/drcp_pconn_close2.phpt +++ b/ext/oci8/tests/drcp_pconn_close2.phpt @@ -2,6 +2,10 @@ DRCP: oci_pconnect() with oci_close() and oci8.old_oci_close_semantics OFF --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=0 oci8.connection_class=test diff --git a/ext/oci8/tests/drcp_privileged.phpt b/ext/oci8/tests/drcp_privileged.phpt index 72d1f03bfd58..77974ff126d0 100644 --- a/ext/oci8/tests/drcp_privileged.phpt +++ b/ext/oci8/tests/drcp_privileged.phpt @@ -4,6 +4,7 @@ DRCP: privileged connect oci8 --SKIPIF-- --INI-- oci8.old_oci_close_semantics=1 --FILE-- diff --git a/ext/oci8/tests/drcp_scope2.phpt b/ext/oci8/tests/drcp_scope2.phpt index 622ddb047223..f057e45efed1 100644 --- a/ext/oci8/tests/drcp_scope2.phpt +++ b/ext/oci8/tests/drcp_scope2.phpt @@ -2,6 +2,10 @@ DRCP: oci_new_connect() and oci_connect with scope end when oci8.old_oci_close_semantics OFF --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=0 --FILE-- diff --git a/ext/oci8/tests/drcp_scope3.phpt b/ext/oci8/tests/drcp_scope3.phpt index 70cef8a88bdc..1637d086123b 100644 --- a/ext/oci8/tests/drcp_scope3.phpt +++ b/ext/oci8/tests/drcp_scope3.phpt @@ -2,6 +2,10 @@ DRCP: oci_pconnect() with scope end when oci8.old_oci_close_semantics ON --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=1 --FILE-- diff --git a/ext/oci8/tests/drcp_scope4.phpt b/ext/oci8/tests/drcp_scope4.phpt index d1d26f931ab0..f72a64b82aef 100644 --- a/ext/oci8/tests/drcp_scope4.phpt +++ b/ext/oci8/tests/drcp_scope4.phpt @@ -2,6 +2,10 @@ DRCP: oci_pconnect() with scope end when oci8.old_oci_close_semantics OFF --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=0 --FILE-- diff --git a/ext/oci8/tests/drcp_scope5.phpt b/ext/oci8/tests/drcp_scope5.phpt index 18f0dbd2fda2..5dd38375207a 100644 --- a/ext/oci8/tests/drcp_scope5.phpt +++ b/ext/oci8/tests/drcp_scope5.phpt @@ -2,6 +2,10 @@ DRCP: oci_pconnect() with scope end when oci8.old_oci_close_semantics ON --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=1 --FILE-- diff --git a/ext/oci8/tests/driver_name.phpt b/ext/oci8/tests/driver_name.phpt index 32cb75a5dc0e..4fbb3a648ed9 100644 --- a/ext/oci8/tests/driver_name.phpt +++ b/ext/oci8/tests/driver_name.phpt @@ -3,7 +3,9 @@ Verify that the Driver Name attribute is set --EXTENSIONS-- oci8 --SKIPIF-- - --FILE-- true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/error2.phpt b/ext/oci8/tests/error2.phpt index 8753def61435..e82e96473ee8 100644 --- a/ext/oci8/tests/error2.phpt +++ b/ext/oci8/tests/error2.phpt @@ -4,6 +4,7 @@ Exercise error code for SUCCESS_WITH_INFO oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); diff --git a/ext/oci8/tests/error3.phpt b/ext/oci8/tests/error3.phpt index c62c417953ae..14b4c0e1fbf1 100644 --- a/ext/oci8/tests/error3.phpt +++ b/ext/oci8/tests/error3.phpt @@ -4,6 +4,7 @@ Maximum Oracle error length oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); // Assume runtime client version is >= compile time client version diff --git a/ext/oci8/tests/error_bind.phpt b/ext/oci8/tests/error_bind.phpt index d98f3475efd0..1939fe238683 100644 --- a/ext/oci8/tests/error_bind.phpt +++ b/ext/oci8/tests/error_bind.phpt @@ -2,6 +2,10 @@ Test some oci_bind_by_name error conditions --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => true); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/error_bind_3.phpt b/ext/oci8/tests/error_bind_3.phpt index 443a2027e40f..28cac6ff1212 100644 --- a/ext/oci8/tests/error_bind_3.phpt +++ b/ext/oci8/tests/error_bind_3.phpt @@ -4,6 +4,7 @@ Test some more oci_bind_by_name error conditions oci8 --SKIPIF-- true, 'timesten' => true); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/error_parse.phpt b/ext/oci8/tests/error_parse.phpt index 369d919ea058..66749b3187d5 100644 --- a/ext/oci8/tests/error_parse.phpt +++ b/ext/oci8/tests/error_parse.phpt @@ -2,6 +2,10 @@ Test error handling when persistent connection is passed to oci_error() --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/fetch_all3.phpt b/ext/oci8/tests/fetch_all3.phpt index b8c008c8d3e4..c73f56580060 100644 --- a/ext/oci8/tests/fetch_all3.phpt +++ b/ext/oci8/tests/fetch_all3.phpt @@ -2,6 +2,10 @@ oci_fetch_all() - all combinations of flags --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/fetch_assoc.phpt b/ext/oci8/tests/fetch_assoc.phpt index 6eec59287c5b..ab654808585a 100644 --- a/ext/oci8/tests/fetch_assoc.phpt +++ b/ext/oci8/tests/fetch_assoc.phpt @@ -2,6 +2,10 @@ oci_fetch_assoc() --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/fetch_object_1.phpt b/ext/oci8/tests/fetch_object_1.phpt index 7d3bf81da670..b86ab410461e 100644 --- a/ext/oci8/tests/fetch_object_1.phpt +++ b/ext/oci8/tests/fetch_object_1.phpt @@ -4,6 +4,7 @@ oci_fetch_object() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/fetch_object_2.phpt b/ext/oci8/tests/fetch_object_2.phpt index 805fac251d50..c3f625fe4cb5 100644 --- a/ext/oci8/tests/fetch_object_2.phpt +++ b/ext/oci8/tests/fetch_object_2.phpt @@ -4,6 +4,7 @@ oci_fetch_object() with CLOB and NULL oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/fetch_row.phpt b/ext/oci8/tests/fetch_row.phpt index 5bbbdfe512ce..c21d033f1dfd 100644 --- a/ext/oci8/tests/fetch_row.phpt +++ b/ext/oci8/tests/fetch_row.phpt @@ -2,6 +2,10 @@ oci_fetch_row() --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/field_funcs1.phpt b/ext/oci8/tests/field_funcs1.phpt index 7c71346c113d..6a7d3b858a65 100644 --- a/ext/oci8/tests/field_funcs1.phpt +++ b/ext/oci8/tests/field_funcs1.phpt @@ -2,6 +2,10 @@ oci_field_*() family: error cases --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_2.phpt b/ext/oci8/tests/imp_res_2.phpt index ebd1e8b126ab..2ba525c5da81 100644 --- a/ext/oci8/tests/imp_res_2.phpt +++ b/ext/oci8/tests/imp_res_2.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: Zero Rows oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_3.phpt b/ext/oci8/tests/imp_res_3.phpt index 6d6b865fcca9..c609fdaefd47 100644 --- a/ext/oci8/tests/imp_res_3.phpt +++ b/ext/oci8/tests/imp_res_3.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: bigger data size oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_4.phpt b/ext/oci8/tests/imp_res_4.phpt index 36fbfc2410a5..3749e52b2788 100644 --- a/ext/oci8/tests/imp_res_4.phpt +++ b/ext/oci8/tests/imp_res_4.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_fetch oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_5.phpt b/ext/oci8/tests/imp_res_5.phpt index 72bacf0e6010..ad6710a311b5 100644 --- a/ext/oci8/tests/imp_res_5.phpt +++ b/ext/oci8/tests/imp_res_5.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_fetch_all oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_6.phpt b/ext/oci8/tests/imp_res_6.phpt index a2810bc51074..98ee8a3bb40a 100644 --- a/ext/oci8/tests/imp_res_6.phpt +++ b/ext/oci8/tests/imp_res_6.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: alternating oci_fetch_* calls oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_7.phpt b/ext/oci8/tests/imp_res_7.phpt index 5fc258be4ba2..72f3887c2383 100644 --- a/ext/oci8/tests/imp_res_7.phpt +++ b/ext/oci8/tests/imp_res_7.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: bigger data size oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_call_error.phpt b/ext/oci8/tests/imp_res_call_error.phpt index ad756626703e..7706a4726af0 100644 --- a/ext/oci8/tests/imp_res_call_error.phpt +++ b/ext/oci8/tests/imp_res_call_error.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: using SQL 'CALL' oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_cancel.phpt b/ext/oci8/tests/imp_res_cancel.phpt index 053e4eaa30de..e6dbe6165e9e 100644 --- a/ext/oci8/tests/imp_res_cancel.phpt +++ b/ext/oci8/tests/imp_res_cancel.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_cancel oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_close.phpt b/ext/oci8/tests/imp_res_close.phpt index 3594f85ec14b..9e25c5db94d2 100644 --- a/ext/oci8/tests/imp_res_close.phpt +++ b/ext/oci8/tests/imp_res_close.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_free_statement #1 oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_cursor.phpt b/ext/oci8/tests/imp_res_cursor.phpt index 92ef9c660bd3..416f9e1c978f 100644 --- a/ext/oci8/tests/imp_res_cursor.phpt +++ b/ext/oci8/tests/imp_res_cursor.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: nested cursor oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_dbmsoutput.phpt b/ext/oci8/tests/imp_res_dbmsoutput.phpt index 58b934c82248..5ad7986bff03 100644 --- a/ext/oci8/tests/imp_res_dbmsoutput.phpt +++ b/ext/oci8/tests/imp_res_dbmsoutput.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: interleaved with DBMS_OUTPUT oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_field.phpt b/ext/oci8/tests/imp_res_field.phpt index 6df7828c2746..c27ffe4ba053 100644 --- a/ext/oci8/tests/imp_res_field.phpt +++ b/ext/oci8/tests/imp_res_field.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: field tests oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_func_error.phpt b/ext/oci8/tests/imp_res_func_error.phpt index 58b8f71a9b48..1662a2abb6d4 100644 --- a/ext/oci8/tests/imp_res_func_error.phpt +++ b/ext/oci8/tests/imp_res_func_error.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: test with a PL/SQL function oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_1.phpt b/ext/oci8/tests/imp_res_get_1.phpt index b8d39cc7c9f9..c0fa5570d529 100644 --- a/ext/oci8/tests/imp_res_get_1.phpt +++ b/ext/oci8/tests/imp_res_get_1.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: basic test oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_2.phpt b/ext/oci8/tests/imp_res_get_2.phpt index d2ef438a5495..1a9f3d7f94d6 100644 --- a/ext/oci8/tests/imp_res_get_2.phpt +++ b/ext/oci8/tests/imp_res_get_2.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: similar to oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_3.phpt b/ext/oci8/tests/imp_res_get_3.phpt index c7b75a06d91f..2447b9de0e2b 100644 --- a/ext/oci8/tests/imp_res_get_3.phpt +++ b/ext/oci8/tests/imp_res_get_3.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: basic test oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_4.phpt b/ext/oci8/tests/imp_res_get_4.phpt index 823656ba8093..95b1f483f0e5 100644 --- a/ext/oci8/tests/imp_res_get_4.phpt +++ b/ext/oci8/tests/imp_res_get_4.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: interleave oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_5.phpt b/ext/oci8/tests/imp_res_get_5.phpt index 912dadfef60f..e8c2d08cf9ee 100644 --- a/ext/oci8/tests/imp_res_get_5.phpt +++ b/ext/oci8/tests/imp_res_get_5.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: get from w oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_all.phpt b/ext/oci8/tests/imp_res_get_all.phpt index 2f007630974c..cfe2e90856d6 100644 --- a/ext/oci8/tests/imp_res_get_all.phpt +++ b/ext/oci8/tests/imp_res_get_all.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_fetch_ oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_cancel.phpt b/ext/oci8/tests/imp_res_get_cancel.phpt index 1cd66731a762..4188929cefbe 100644 --- a/ext/oci8/tests/imp_res_get_cancel.phpt +++ b/ext/oci8/tests/imp_res_get_cancel.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_cancel oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_close_1.phpt b/ext/oci8/tests/imp_res_get_close_1.phpt index 3abb885cc604..5d1de22f979a 100644 --- a/ext/oci8/tests/imp_res_get_close_1.phpt +++ b/ext/oci8/tests/imp_res_get_close_1.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_free_s oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_close_2.phpt b/ext/oci8/tests/imp_res_get_close_2.phpt index 4f75ec3b9c35..04206406953e 100644 --- a/ext/oci8/tests/imp_res_get_close_2.phpt +++ b/ext/oci8/tests/imp_res_get_close_2.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_free_s oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_close_3.phpt b/ext/oci8/tests/imp_res_get_close_3.phpt index 722d28fbd002..de9cdcd3de52 100644 --- a/ext/oci8/tests/imp_res_get_close_3.phpt +++ b/ext/oci8/tests/imp_res_get_close_3.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: oci_free_s oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_cursor.phpt b/ext/oci8/tests/imp_res_get_cursor.phpt index 715ed531e03d..2aea8b1b654f 100644 --- a/ext/oci8/tests/imp_res_get_cursor.phpt +++ b/ext/oci8/tests/imp_res_get_cursor.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: nested cur oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_dbmsoutput.phpt b/ext/oci8/tests/imp_res_get_dbmsoutput.phpt index 02cd8c6148e8..7e1a32083e6f 100644 --- a/ext/oci8/tests/imp_res_get_dbmsoutput.phpt +++ b/ext/oci8/tests/imp_res_get_dbmsoutput.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: interleave oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_exec.phpt b/ext/oci8/tests/imp_res_get_exec.phpt index c8961cbb4c6c..d9055d4bbcf8 100644 --- a/ext/oci8/tests/imp_res_get_exec.phpt +++ b/ext/oci8/tests/imp_res_get_exec.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: Execute tw oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_get_none.phpt b/ext/oci8/tests/imp_res_get_none.phpt index 8d268b00f1ef..530946d6870e 100644 --- a/ext/oci8/tests/imp_res_get_none.phpt +++ b/ext/oci8/tests/imp_res_get_none.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: oci_get_implicit_resultset: no implici oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_insert.phpt b/ext/oci8/tests/imp_res_insert.phpt index 355a88520d5a..6d05e0904d0f 100644 --- a/ext/oci8/tests/imp_res_insert.phpt +++ b/ext/oci8/tests/imp_res_insert.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: Commit modes oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_lob.phpt b/ext/oci8/tests/imp_res_lob.phpt index 8633d78baf08..476861270b93 100644 --- a/ext/oci8/tests/imp_res_lob.phpt +++ b/ext/oci8/tests/imp_res_lob.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: LOBs oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/imp_res_prefetch.phpt b/ext/oci8/tests/imp_res_prefetch.phpt index 1be4d2f949b2..c9da07b2a689 100644 --- a/ext/oci8/tests/imp_res_prefetch.phpt +++ b/ext/oci8/tests/imp_res_prefetch.phpt @@ -4,6 +4,7 @@ Oracle Database 12c Implicit Result Sets: basic test oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); diff --git a/ext/oci8/tests/lob_001.phpt b/ext/oci8/tests/lob_001.phpt index 2135c579c717..ff4df08bf9bf 100644 --- a/ext/oci8/tests/lob_001.phpt +++ b/ext/oci8/tests/lob_001.phpt @@ -4,6 +4,7 @@ oci_lob_write() and friends oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_002.phpt b/ext/oci8/tests/lob_002.phpt index bf63ec246a6d..2b4d2f5eac6b 100644 --- a/ext/oci8/tests/lob_002.phpt +++ b/ext/oci8/tests/lob_002.phpt @@ -4,6 +4,7 @@ oci_lob_write() and friends (with errors) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_003.phpt b/ext/oci8/tests/lob_003.phpt index 5ebc124a2939..e0e14d018704 100644 --- a/ext/oci8/tests/lob_003.phpt +++ b/ext/oci8/tests/lob_003.phpt @@ -4,6 +4,7 @@ oci_lob_read() and friends oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_004.phpt b/ext/oci8/tests/lob_004.phpt index b92512e4b47d..5d804c502a1d 100644 --- a/ext/oci8/tests/lob_004.phpt +++ b/ext/oci8/tests/lob_004.phpt @@ -4,6 +4,7 @@ oci_lob_seek()/rewind()/append() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_005.phpt b/ext/oci8/tests/lob_005.phpt index 6180da2b4df6..729797343927 100644 --- a/ext/oci8/tests/lob_005.phpt +++ b/ext/oci8/tests/lob_005.phpt @@ -4,6 +4,7 @@ oci_lob_is_equal() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_006.phpt b/ext/oci8/tests/lob_006.phpt index aaf6946bc59e..f952289089ae 100644 --- a/ext/oci8/tests/lob_006.phpt +++ b/ext/oci8/tests/lob_006.phpt @@ -4,6 +4,7 @@ oci_lob_write()/truncate()/erase() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_007.phpt b/ext/oci8/tests/lob_007.phpt index be758ff34a34..3215adda995f 100644 --- a/ext/oci8/tests/lob_007.phpt +++ b/ext/oci8/tests/lob_007.phpt @@ -4,6 +4,7 @@ oci_lob_write()/size()/load() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_008.phpt b/ext/oci8/tests/lob_008.phpt index 72858fccf1ba..392ac879d30f 100644 --- a/ext/oci8/tests/lob_008.phpt +++ b/ext/oci8/tests/lob_008.phpt @@ -4,6 +4,7 @@ oci_lob_write()/read()/eof() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_009.phpt b/ext/oci8/tests/lob_009.phpt index 84fb3b9ddbe4..aeba4cf1710a 100644 --- a/ext/oci8/tests/lob_009.phpt +++ b/ext/oci8/tests/lob_009.phpt @@ -4,6 +4,7 @@ oci_lob_import()/read() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_010.phpt b/ext/oci8/tests/lob_010.phpt index b73819e680e5..2a2963ddc00e 100644 --- a/ext/oci8/tests/lob_010.phpt +++ b/ext/oci8/tests/lob_010.phpt @@ -4,6 +4,7 @@ oci_lob_save() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_011.phpt b/ext/oci8/tests/lob_011.phpt index d7eeb1afd633..fa9050da8af0 100644 --- a/ext/oci8/tests/lob_011.phpt +++ b/ext/oci8/tests/lob_011.phpt @@ -4,6 +4,7 @@ oci_lob_copy() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_012.phpt b/ext/oci8/tests/lob_012.phpt index 71f6e648614c..4c0b0a93e276 100644 --- a/ext/oci8/tests/lob_012.phpt +++ b/ext/oci8/tests/lob_012.phpt @@ -4,6 +4,7 @@ oci_lob_export() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_013.phpt b/ext/oci8/tests/lob_013.phpt index b15bcd09d045..f667360863cb 100644 --- a/ext/oci8/tests/lob_013.phpt +++ b/ext/oci8/tests/lob_013.phpt @@ -4,6 +4,7 @@ lob buffering oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_014.phpt b/ext/oci8/tests/lob_014.phpt index 75da710a6e52..dc8221aba761 100644 --- a/ext/oci8/tests/lob_014.phpt +++ b/ext/oci8/tests/lob_014.phpt @@ -4,6 +4,7 @@ oci_lob_free()/close() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_016.phpt b/ext/oci8/tests/lob_016.phpt index 9b95b7487485..4f86945f0c60 100644 --- a/ext/oci8/tests/lob_016.phpt +++ b/ext/oci8/tests/lob_016.phpt @@ -4,6 +4,7 @@ returning multiple lobs oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_017.phpt b/ext/oci8/tests/lob_017.phpt index d23f406eba96..2e386090c799 100644 --- a/ext/oci8/tests/lob_017.phpt +++ b/ext/oci8/tests/lob_017.phpt @@ -4,6 +4,7 @@ returning multiple lobs (using persistent connection) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_018.phpt b/ext/oci8/tests/lob_018.phpt index a6833dd2591c..3b88f8b3456e 100644 --- a/ext/oci8/tests/lob_018.phpt +++ b/ext/oci8/tests/lob_018.phpt @@ -4,6 +4,7 @@ fetching the same lob several times oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_019.phpt b/ext/oci8/tests/lob_019.phpt index 1ae83446299f..a8a6eccf011e 100644 --- a/ext/oci8/tests/lob_019.phpt +++ b/ext/oci8/tests/lob_019.phpt @@ -4,6 +4,7 @@ oci_lob_write()/erase()/read() with BLOBs oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_020.phpt b/ext/oci8/tests/lob_020.phpt index 2f9b3840a44a..4c321e725e08 100644 --- a/ext/oci8/tests/lob_020.phpt +++ b/ext/oci8/tests/lob_020.phpt @@ -4,6 +4,7 @@ oci_lob_write()/erase()/read() with CLOBs oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_021.phpt b/ext/oci8/tests/lob_021.phpt index 8039cc678e0f..27a1bc729b3a 100644 --- a/ext/oci8/tests/lob_021.phpt +++ b/ext/oci8/tests/lob_021.phpt @@ -4,6 +4,7 @@ oci_lob_free()/close() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_022.phpt b/ext/oci8/tests/lob_022.phpt index 914335551543..1afd18d3573b 100644 --- a/ext/oci8/tests/lob_022.phpt +++ b/ext/oci8/tests/lob_022.phpt @@ -4,6 +4,7 @@ fetching the same lob several times oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_023.phpt b/ext/oci8/tests/lob_023.phpt index b6ab381eea4b..c6455251daa3 100644 --- a/ext/oci8/tests/lob_023.phpt +++ b/ext/oci8/tests/lob_023.phpt @@ -4,6 +4,7 @@ oci_lob_import()/read() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_024.phpt b/ext/oci8/tests/lob_024.phpt index 5c286e850446..3e9bd774aa4b 100644 --- a/ext/oci8/tests/lob_024.phpt +++ b/ext/oci8/tests/lob_024.phpt @@ -4,6 +4,7 @@ oci_lob_load() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_025.phpt b/ext/oci8/tests/lob_025.phpt index 8ea5aa1ace88..890889df450f 100644 --- a/ext/oci8/tests/lob_025.phpt +++ b/ext/oci8/tests/lob_025.phpt @@ -4,6 +4,7 @@ oci_lob_read() tests oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_026.phpt b/ext/oci8/tests/lob_026.phpt index ddd114ef3e24..249f128e0365 100644 --- a/ext/oci8/tests/lob_026.phpt +++ b/ext/oci8/tests/lob_026.phpt @@ -4,6 +4,7 @@ oci_lob_seek()/rewind()/append() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_027.phpt b/ext/oci8/tests/lob_027.phpt index 4ce6adbabb68..f7ed8dd10fc9 100644 --- a/ext/oci8/tests/lob_027.phpt +++ b/ext/oci8/tests/lob_027.phpt @@ -4,6 +4,7 @@ oci_lob_truncate() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_028.phpt b/ext/oci8/tests/lob_028.phpt index 267855c0e79f..9d360e168224 100644 --- a/ext/oci8/tests/lob_028.phpt +++ b/ext/oci8/tests/lob_028.phpt @@ -4,6 +4,7 @@ Test descriptor types for oci_new_descriptor() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_029.phpt b/ext/oci8/tests/lob_029.phpt index fceab492604b..4d57cd6589ed 100644 --- a/ext/oci8/tests/lob_029.phpt +++ b/ext/oci8/tests/lob_029.phpt @@ -4,6 +4,7 @@ reading/writing BFILE LOBs oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ob_start(); diff --git a/ext/oci8/tests/lob_030.phpt b/ext/oci8/tests/lob_030.phpt index c5719fdc87c3..ba6a81fcb5bf 100644 --- a/ext/oci8/tests/lob_030.phpt +++ b/ext/oci8/tests/lob_030.phpt @@ -4,6 +4,7 @@ Test piecewise fetch of CLOBs equal to, and larger than PHP_OCI_LOB_BUFFER_SIZE oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_031.phpt b/ext/oci8/tests/lob_031.phpt index f05230ff78aa..57ce79dcfd25 100644 --- a/ext/oci8/tests/lob_031.phpt +++ b/ext/oci8/tests/lob_031.phpt @@ -4,6 +4,7 @@ Test LOB->read(), LOB->seek() and LOB->tell() with nul bytes in data oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_032.phpt b/ext/oci8/tests/lob_032.phpt index edf78b06b8ef..78e9162503f3 100644 --- a/ext/oci8/tests/lob_032.phpt +++ b/ext/oci8/tests/lob_032.phpt @@ -4,6 +4,7 @@ oci_lob_write() and friends oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_033.phpt b/ext/oci8/tests/lob_033.phpt index 256b49851583..9b1088f7df07 100644 --- a/ext/oci8/tests/lob_033.phpt +++ b/ext/oci8/tests/lob_033.phpt @@ -4,6 +4,7 @@ various oci_lob_write() error messages oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_034.phpt b/ext/oci8/tests/lob_034.phpt index ffbc0a31161a..376c4e9fb834 100644 --- a/ext/oci8/tests/lob_034.phpt +++ b/ext/oci8/tests/lob_034.phpt @@ -4,6 +4,7 @@ lob buffering - 2 oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_035.phpt b/ext/oci8/tests/lob_035.phpt index b9a0c2a10210..5cece1936716 100644 --- a/ext/oci8/tests/lob_035.phpt +++ b/ext/oci8/tests/lob_035.phpt @@ -4,6 +4,7 @@ oci_lob_copy() - 2 oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_036.phpt b/ext/oci8/tests/lob_036.phpt index e2ad1d631f7c..5911f2f3570e 100644 --- a/ext/oci8/tests/lob_036.phpt +++ b/ext/oci8/tests/lob_036.phpt @@ -4,6 +4,7 @@ Exercise cleanup code when LOB buffering is on oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_037.phpt b/ext/oci8/tests/lob_037.phpt index 5689ac1b6f91..91c94950d828 100644 --- a/ext/oci8/tests/lob_037.phpt +++ b/ext/oci8/tests/lob_037.phpt @@ -4,6 +4,7 @@ Fetching two different lobs and using them after fetch oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_038.phpt b/ext/oci8/tests/lob_038.phpt index 0227ceba0e4a..e02ba462ae65 100644 --- a/ext/oci8/tests/lob_038.phpt +++ b/ext/oci8/tests/lob_038.phpt @@ -4,6 +4,7 @@ Array fetch CLOB and BLOB oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_039.phpt b/ext/oci8/tests/lob_039.phpt index 6033261c8ae4..68c37f64e87e 100644 --- a/ext/oci8/tests/lob_039.phpt +++ b/ext/oci8/tests/lob_039.phpt @@ -4,6 +4,7 @@ Test CLOB->write() for multiple inserts oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_040.phpt b/ext/oci8/tests/lob_040.phpt index 3a5eef7e7f8b..fc5cc558bde7 100644 --- a/ext/oci8/tests/lob_040.phpt +++ b/ext/oci8/tests/lob_040.phpt @@ -4,6 +4,7 @@ Bug #37706 (Test LOB locator reuse. Extends simple test of lob_037.phpt) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_041.phpt b/ext/oci8/tests/lob_041.phpt index 6f0c4268b552..dbe1e0f2f808 100644 --- a/ext/oci8/tests/lob_041.phpt +++ b/ext/oci8/tests/lob_041.phpt @@ -4,6 +4,7 @@ Check LOBS are valid after statement free oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_042.phpt b/ext/oci8/tests/lob_042.phpt index 431dd7d9f75b..3c6c022fe6be 100644 --- a/ext/oci8/tests/lob_042.phpt +++ b/ext/oci8/tests/lob_042.phpt @@ -4,6 +4,7 @@ Check various LOB error messages oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt index e85e56768f47..6046c4630160 100644 --- a/ext/oci8/tests/lob_043.phpt +++ b/ext/oci8/tests/lob_043.phpt @@ -4,6 +4,7 @@ Bug #49560 (LOB resource destructor and refcount test) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); diff --git a/ext/oci8/tests/lob_044.phpt b/ext/oci8/tests/lob_044.phpt index 76137fb88648..c2cd41a3b07d 100644 --- a/ext/oci8/tests/lob_044.phpt +++ b/ext/oci8/tests/lob_044.phpt @@ -4,6 +4,7 @@ oci_lob_truncate() with default parameter value oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_aliases.phpt b/ext/oci8/tests/lob_aliases.phpt index f4b08cfedf57..031a1a4a6e57 100644 --- a/ext/oci8/tests/lob_aliases.phpt +++ b/ext/oci8/tests/lob_aliases.phpt @@ -2,11 +2,6 @@ LOB method aliases --EXTENSIONS-- oci8 ---SKIPIF-- - true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -?> --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_prefetch.phpt b/ext/oci8/tests/lob_prefetch.phpt index 909e20b38605..b32fb5e99029 100755 --- a/ext/oci8/tests/lob_prefetch.phpt +++ b/ext/oci8/tests/lob_prefetch.phpt @@ -4,6 +4,7 @@ LOB prefetching oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_prefetch_ini.phpt b/ext/oci8/tests/lob_prefetch_ini.phpt index 51ae2e3c9a8c..1b61a4ca6302 100755 --- a/ext/oci8/tests/lob_prefetch_ini.phpt +++ b/ext/oci8/tests/lob_prefetch_ini.phpt @@ -4,6 +4,7 @@ LOB prefetching with oci8. oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_temp.phpt b/ext/oci8/tests/lob_temp.phpt index 5fc90257e9bd..e3c1c991a897 100644 --- a/ext/oci8/tests/lob_temp.phpt +++ b/ext/oci8/tests/lob_temp.phpt @@ -4,6 +4,7 @@ temporary lobs oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_temp1.phpt b/ext/oci8/tests/lob_temp1.phpt index a1c4d8bad4a9..e6aee359a625 100644 --- a/ext/oci8/tests/lob_temp1.phpt +++ b/ext/oci8/tests/lob_temp1.phpt @@ -4,6 +4,7 @@ closing temporary lobs oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/lob_temp2.phpt b/ext/oci8/tests/lob_temp2.phpt index be2fcd749783..21f24921f103 100644 --- a/ext/oci8/tests/lob_temp2.phpt +++ b/ext/oci8/tests/lob_temp2.phpt @@ -4,6 +4,7 @@ Writing temporary lob before binding oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/null_byte_1.phpt b/ext/oci8/tests/null_byte_1.phpt index b02135cddd87..02f164940eba 100644 --- a/ext/oci8/tests/null_byte_1.phpt +++ b/ext/oci8/tests/null_byte_1.phpt @@ -4,6 +4,7 @@ Protect against null bytes in LOB filenames oci8 --SKIPIF-- diff --git a/ext/oci8/tests/null_byte_2.phpt b/ext/oci8/tests/null_byte_2.phpt index 2a5cf9047c2d..f8bd4a02f54c 100644 --- a/ext/oci8/tests/null_byte_2.phpt +++ b/ext/oci8/tests/null_byte_2.phpt @@ -4,6 +4,7 @@ Null bytes in SQL statements oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/null_byte_3.phpt b/ext/oci8/tests/null_byte_3.phpt index e6bc3e91fd4a..bbf33620642c 100644 --- a/ext/oci8/tests/null_byte_3.phpt +++ b/ext/oci8/tests/null_byte_3.phpt @@ -2,6 +2,10 @@ Null bytes in SQL statements --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- display_errors = On error_reporting = E_WARNING diff --git a/ext/oci8/tests/num.phpt b/ext/oci8/tests/num.phpt index 955b3b00a2d4..b4469d348cf5 100644 --- a/ext/oci8/tests/num.phpt +++ b/ext/oci8/tests/num.phpt @@ -2,6 +2,10 @@ oci_num_*() family --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/old_oci_close.phpt b/ext/oci8/tests/old_oci_close.phpt index 2b0c32a1a0ae..645331e37999 100644 --- a/ext/oci8/tests/old_oci_close.phpt +++ b/ext/oci8/tests/old_oci_close.phpt @@ -2,6 +2,10 @@ oci8.old_oci_close_semantics On --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=1 --FILE-- diff --git a/ext/oci8/tests/old_oci_close1.phpt b/ext/oci8/tests/old_oci_close1.phpt index fa1cbba09e30..88e34903ab37 100644 --- a/ext/oci8/tests/old_oci_close1.phpt +++ b/ext/oci8/tests/old_oci_close1.phpt @@ -2,6 +2,10 @@ oci8.old_oci_close_semantics Off --EXTENSIONS-- oci8 +--SKIPIF-- + --INI-- oci8.old_oci_close_semantics=0 --FILE-- diff --git a/ext/oci8/tests/password.phpt b/ext/oci8/tests/password.phpt index 89b9296cb15c..c99a999597d8 100644 --- a/ext/oci8/tests/password.phpt +++ b/ext/oci8/tests/password.phpt @@ -4,8 +4,8 @@ oci_password_change() for non-persistent connections oci8 --SKIPIF-- diff --git a/ext/oci8/tests/password_2.phpt b/ext/oci8/tests/password_2.phpt index 27eaf4b38fc5..18b3a2ac3fb1 100644 --- a/ext/oci8/tests/password_2.phpt +++ b/ext/oci8/tests/password_2.phpt @@ -4,8 +4,8 @@ oci_password_change() for persistent connections oci8 --SKIPIF-- diff --git a/ext/oci8/tests/password_new.phpt b/ext/oci8/tests/password_new.phpt index a9746ada7cb0..00c08ddfbbeb 100644 --- a/ext/oci8/tests/password_new.phpt +++ b/ext/oci8/tests/password_new.phpt @@ -4,6 +4,7 @@ oci_password_change() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); require(__DIR__.'/connect.inc'); diff --git a/ext/oci8/tests/pecl_bug10194.phpt b/ext/oci8/tests/pecl_bug10194.phpt index 3c82247c1f52..8fc08d7898bc 100644 --- a/ext/oci8/tests/pecl_bug10194.phpt +++ b/ext/oci8/tests/pecl_bug10194.phpt @@ -4,6 +4,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); diff --git a/ext/oci8/tests/pecl_bug10194_blob.phpt b/ext/oci8/tests/pecl_bug10194_blob.phpt index 7375d7b9c642..1cd483f665f8 100644 --- a/ext/oci8/tests/pecl_bug10194_blob.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob.phpt @@ -4,6 +4,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only"); diff --git a/ext/oci8/tests/pecl_bug10194_blob_64.phpt b/ext/oci8/tests/pecl_bug10194_blob_64.phpt index 051feb157f4a..0fa46b152dd3 100644 --- a/ext/oci8/tests/pecl_bug10194_blob_64.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob_64.phpt @@ -4,6 +4,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside oci8 --SKIPIF-- true, 'timesten' => false); // test runs on thes require(__DIR__.'/skipif.inc'); if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); diff --git a/ext/oci8/tests/pecl_bug16842.phpt b/ext/oci8/tests/pecl_bug16842.phpt index b2c10ae710a3..1ece0095c2f7 100644 --- a/ext/oci8/tests/pecl_bug16842.phpt +++ b/ext/oci8/tests/pecl_bug16842.phpt @@ -4,6 +4,7 @@ PECL Bug #16842 (NO_DATA_FOUND exception is a warning) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/pecl_bug6109.phpt b/ext/oci8/tests/pecl_bug6109.phpt index e0677280d6bc..3afb4178f6d4 100644 --- a/ext/oci8/tests/pecl_bug6109.phpt +++ b/ext/oci8/tests/pecl_bug6109.phpt @@ -2,6 +2,10 @@ PECL Bug #6109 (Error messages not kept) --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/persistent.phpt b/ext/oci8/tests/persistent.phpt index a406afb5d7eb..0d5ae15ce197 100644 --- a/ext/oci8/tests/persistent.phpt +++ b/ext/oci8/tests/persistent.phpt @@ -2,6 +2,10 @@ reusing persistent connections --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- --FILE-- --INI-- diff --git a/ext/oci8/tests/refcur_prefetch_1.phpt b/ext/oci8/tests/refcur_prefetch_1.phpt index 29ba7aaa420f..0c0d6747c42e 100644 --- a/ext/oci8/tests/refcur_prefetch_1.phpt +++ b/ext/oci8/tests/refcur_prefetch_1.phpt @@ -3,7 +3,9 @@ Prefetch with REF cursor. Test different values for prefetch with oci_set_prefet --EXTENSIONS-- oci8 --SKIPIF-- -= 10))) { diff --git a/ext/oci8/tests/refcur_prefetch_2.phpt b/ext/oci8/tests/refcur_prefetch_2.phpt index 76d2669fb27a..5666f9240771 100644 --- a/ext/oci8/tests/refcur_prefetch_2.phpt +++ b/ext/oci8/tests/refcur_prefetch_2.phpt @@ -3,7 +3,9 @@ Prefetch with REF cursor. Test No 2 --EXTENSIONS-- oci8 --SKIPIF-- -= 10))) { diff --git a/ext/oci8/tests/refcur_prefetch_3.phpt b/ext/oci8/tests/refcur_prefetch_3.phpt index f8eddd46e141..8e9822920322 100644 --- a/ext/oci8/tests/refcur_prefetch_3.phpt +++ b/ext/oci8/tests/refcur_prefetch_3.phpt @@ -5,7 +5,9 @@ oci8.default_prefetch=5 --EXTENSIONS-- oci8 --SKIPIF-- -= 2) || diff --git a/ext/oci8/tests/refcur_prefetch_4.phpt b/ext/oci8/tests/refcur_prefetch_4.phpt index 8e923e5a5309..94d4a517b895 100644 --- a/ext/oci8/tests/refcur_prefetch_4.phpt +++ b/ext/oci8/tests/refcur_prefetch_4.phpt @@ -3,7 +3,9 @@ Prefetch with REF cursor. Test No 4 --EXTENSIONS-- oci8 --SKIPIF-- -= 10))) { diff --git a/ext/oci8/tests/select_null.phpt b/ext/oci8/tests/select_null.phpt index 4d9bee290081..652f682e6c40 100644 --- a/ext/oci8/tests/select_null.phpt +++ b/ext/oci8/tests/select_null.phpt @@ -2,6 +2,10 @@ SELECTing NULL values --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --FILE-- "; + } + else { + $msg .= "\"$dbase\""; + } + $msg .= " as user \"$user\""; + $e = oci_error(); + $msg .= ": {$e['message']}"; + die($msg); +} + +?> diff --git a/ext/oci8/tests/statement_cache.phpt b/ext/oci8/tests/statement_cache.phpt index 973eac689d30..365fc733b467 100644 --- a/ext/oci8/tests/statement_cache.phpt +++ b/ext/oci8/tests/statement_cache.phpt @@ -4,6 +4,7 @@ statement cache oci8 --SKIPIF-- true, 'timesten' => true); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/statement_type.phpt b/ext/oci8/tests/statement_type.phpt index 709ab5cab028..d15e1a81e25e 100644 --- a/ext/oci8/tests/statement_type.phpt +++ b/ext/oci8/tests/statement_type.phpt @@ -2,6 +2,10 @@ oci_statement_type() --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- --INI-- oci8.ping_interval=0 --FILE-- diff --git a/ext/oci8/tests/uncommitted.phpt b/ext/oci8/tests/uncommitted.phpt index 6b900f4e3a00..06c307fb69dc 100644 --- a/ext/oci8/tests/uncommitted.phpt +++ b/ext/oci8/tests/uncommitted.phpt @@ -2,6 +2,10 @@ uncommitted connection --EXTENSIONS-- oci8 +--SKIPIF-- + --FILE-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> diff --git a/ext/oci8/tests/xmltype_02.phpt b/ext/oci8/tests/xmltype_02.phpt index 7e7be351f07d..f9c152d8b422 100644 --- a/ext/oci8/tests/xmltype_02.phpt +++ b/ext/oci8/tests/xmltype_02.phpt @@ -5,6 +5,7 @@ simplexml oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs require(__DIR__.'/skipif.inc'); ?> From 37d35f5ed82651648a32739d9e9ba4d20873f6af Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Mon, 31 Jul 2023 16:29:14 +0200 Subject: [PATCH 025/120] Move --enable/--disable-fiber-asm help output (#11827) This moves the fiber configure option in the Zend section. TSRM doesn't currently have any specific configure options so it can be removed from the ./configure --help output. --- configure.ac | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 46c653673dd1..66503615edcd 100644 --- a/configure.ac +++ b/configure.ac @@ -1255,14 +1255,14 @@ fi dnl Configuring Zend and TSRM. dnl ---------------------------------------------------------------------------- +PHP_HELP_SEPARATOR([Zend:]) +PHP_CONFIGURE_PART(Configuring Zend) + AC_ARG_ENABLE([fiber-asm], [AS_HELP_STRING([--disable-fiber-asm], [Disable the use of boost fiber assembly files])], [fiber_asm=$enableval], [fiber_asm='yes']) -PHP_HELP_SEPARATOR([Zend:]) -PHP_CONFIGURE_PART(Configuring Zend) - AS_CASE([$host_cpu], [x86_64*|amd64*], [fiber_cpu="x86_64"], [x86*|amd*|i?86*|pentium], [fiber_cpu="i386"], @@ -1375,7 +1375,6 @@ fi ZEND_EXTRA_LIBS="$LIBS" unset LIBS -PHP_HELP_SEPARATOR([TSRM:]) PHP_CONFIGURE_PART(Configuring TSRM) if test "$PHP_THREAD_SAFETY" = "yes"; then TSRM_CHECK_PTHREADS From c7cbe3764a915971cd256ac4f8132c92843683a0 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 31 Jul 2023 16:56:24 +0200 Subject: [PATCH 026/120] [ci skip] PHP 8.3 Upgrading: add missing POSIX constants Follow up on 10238 which added these constants. Close GH-11835 --- UPGRADING | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/UPGRADING b/UPGRADING index 11668111f7fd..5a209f65116b 100644 --- a/UPGRADING +++ b/UPGRADING @@ -453,10 +453,20 @@ PHP 8.3 UPGRADE NOTES . PGSQL_ERRORS_SQLSTATE. - Posix: - . POSIX_SC_ARG_MAX. - . POSIX_SC_PAGESIZE. - . POSIX_SC_NPROCESSORS_CONF. - . POSIX_SC_NPROCESSORS_ONLN. + . POSIX_SC_ARG_MAX + . POSIX_SC_PAGESIZE + . POSIX_SC_NPROCESSORS_CONF + . POSIX_SC_NPROCESSORS_ONLN + . POSIX_PC_LINK_MAX + . POSIX_PC_MAX_CANON + . POSIX_PC_MAX_INPUT + . POSIX_PC_NAME_MAX + . POSIX_PC_PATH_MAX + . POSIX_PC_PIPE_BUF + . POSIX_PC_CHOWN_RESTRICTED + . POSIX_PC_NO_TRUNC + . POSIX_PC_ALLOC_SIZE_MIN + . POSIX_PC_SYMLINK_MAX - Sockets: . SO_ATTACH_REUSEPORT_CBPF (Linux only). From a8fa0b54d82ef98b0f014ad074a4b018b71a30fe Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 31 Jul 2023 17:20:54 +0200 Subject: [PATCH 027/120] [ci skip] PHP 8.3 Upgrading: fix pg_set_error_context_visibility typo Ref: https://github.com/php/php-src/commit/21aaf3321fe47aa4e19a79616ca1966c212aa158 Close GH-11837 --- UPGRADING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPGRADING b/UPGRADING index 5a209f65116b..9dcdf640e967 100644 --- a/UPGRADING +++ b/UPGRADING @@ -355,7 +355,7 @@ PHP 8.3 UPGRADE NOTES . Added posix_eaccess call to check the effective user id's permission for a path. - PGSQL: - . Added pg_set_error_context_visilibity to set the visibility of the context + . Added pg_set_error_context_visibility to set the visibility of the context in error messages (with libpq >= 9.6). - Random: From 78bfe682a5f7e15ae80ef2a9ca9cda0b4557096f Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 31 Jul 2023 17:37:58 +0200 Subject: [PATCH 028/120] [ci skip] PHP 8.3 Upgrading: add missing PGSQL functions/constants Follow up on 10868, which introduced these functions and constants. add missing PGSQL visibility constants Follow up on 10935, which introduced these constants. Close GH-11838 --- UPGRADING | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/UPGRADING b/UPGRADING index 9dcdf640e967..79edf41a959e 100644 --- a/UPGRADING +++ b/UPGRADING @@ -357,6 +357,10 @@ PHP 8.3 UPGRADE NOTES - PGSQL: . Added pg_set_error_context_visibility to set the visibility of the context in error messages (with libpq >= 9.6). + . Added pg_enter_pipeline_mode(). + . Added pg_exit_pipeline_mode(). + . Added pg_pipeline_sync(). + . Added pg_pipeline_status(). - Random: . Added Randomizer::getBytesFromString(). @@ -448,9 +452,16 @@ PHP 8.3 UPGRADE NOTES . SIGINFO - PGSQL: - . PGSQL_TRACE_SUPPRESS_TIMESTAMPS. - . PGSQL_TRACE_REGRESS_MODE. - . PGSQL_ERRORS_SQLSTATE. + . PGSQL_TRACE_SUPPRESS_TIMESTAMPS + . PGSQL_TRACE_REGRESS_MODE + . PGSQL_ERRORS_SQLSTATE + . PGSQL_PIPELINE_SYNC + . PGSQL_PIPELINE_ON + . PGSQL_PIPELINE_OFF + . PGSQL_PIPELINE_ABORTED + . PGSQL_SHOW_CONTEXT_NEVER + . PGSQL_SHOW_CONTEXT_ERRORS + . PGSQL_SHOW_CONTEXT_ALWAYS - Posix: . POSIX_SC_ARG_MAX From 68e6de5408bddff5a383887e93063291d54d9595 Mon Sep 17 00:00:00 2001 From: Juliette <663378+jrfnl@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:47:31 +0200 Subject: [PATCH 029/120] GH Actions: auto-skip CI on PRs containing only docs changes (#11839) As per https://github.com/php/php-src/pull/11838#issuecomment-1658648817 Co-authored-by: jrfnl --- .github/workflows/push.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 35519428a166..3d1c75497805 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -16,6 +16,14 @@ on: - PHP-8.2 - master pull_request: + paths-ignore: + - docs/* + - NEWS + - UPGRADING + - UPGRADING.INTERNALS + - README.md + - CONTRIBUTING.md + - CODING_STANDARDS.md branches: - '**' permissions: From 3e9792f4a218ead9fdc88a6710c82f08780d256e Mon Sep 17 00:00:00 2001 From: Mikhail Galanin Date: Thu, 27 Jul 2023 12:54:29 +0100 Subject: [PATCH 030/120] Check if restart is pending before trying to lock SHM This reduces lock contention when Opcache restart is scheduled but not yet started. Closes GH-11805 --- NEWS | 2 ++ ext/opcache/zend_file_cache.c | 1 + 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 989e53f28503..87a478e4b4e0 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,8 @@ PHP NEWS - Opcache: . Fixed bug GH-11715 (opcache.interned_strings_buffer either has no effect or opcache_get_status() / phpinfo() is wrong). (nielsdos) + . Avoid adding an unnecessary read-lock when loading script from shm if + restart is in progress. (mikhainin) - Standard: . Prevent int overflow on $decimals in number_format. (Marc Bennewitz) diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 22ccc4d84305..bcee38079b35 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -1786,6 +1786,7 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl if (!file_cache_only && !ZCSG(restart_in_progress) && + !ZCSG(restart_pending) && !ZSMMG(memory_exhausted) && accelerator_shm_read_lock() == SUCCESS) { /* exclusive lock */ From 80316123f3e9dcce8ac419bd9dd43546e2ccb5ef Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 10 Jul 2023 13:25:34 +0200 Subject: [PATCH 031/120] Fix buffer mismanagement in phar_dir_read() Fixes GHSA-jqcx-ccgc-xwhv. --- ext/phar/dirstream.c | 15 ++++++++------ ext/phar/tests/GHSA-jqcx-ccgc-xwhv.phpt | 27 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 ext/phar/tests/GHSA-jqcx-ccgc-xwhv.phpt diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c index 7ddd7b564bfa..5a53726e406b 100644 --- a/ext/phar/dirstream.c +++ b/ext/phar/dirstream.c @@ -91,25 +91,28 @@ static int phar_dir_seek(php_stream *stream, zend_off_t offset, int whence, zend */ static ssize_t phar_dir_read(php_stream *stream, char *buf, size_t count) /* {{{ */ { - size_t to_read; HashTable *data = (HashTable *)stream->abstract; zend_string *str_key; zend_ulong unused; + if (count != sizeof(php_stream_dirent)) { + return -1; + } + if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key(data, &str_key, &unused)) { return 0; } zend_hash_move_forward(data); - to_read = MIN(ZSTR_LEN(str_key), count); - if (to_read == 0 || count < ZSTR_LEN(str_key)) { + php_stream_dirent *dirent = (php_stream_dirent *) buf; + + if (sizeof(dirent->d_name) <= ZSTR_LEN(str_key)) { return 0; } - memset(buf, 0, sizeof(php_stream_dirent)); - memcpy(((php_stream_dirent *) buf)->d_name, ZSTR_VAL(str_key), to_read); - ((php_stream_dirent *) buf)->d_name[to_read + 1] = '\0'; + memset(dirent, 0, sizeof(php_stream_dirent)); + PHP_STRLCPY(dirent->d_name, ZSTR_VAL(str_key), sizeof(dirent->d_name), ZSTR_LEN(str_key)); return sizeof(php_stream_dirent); } diff --git a/ext/phar/tests/GHSA-jqcx-ccgc-xwhv.phpt b/ext/phar/tests/GHSA-jqcx-ccgc-xwhv.phpt new file mode 100644 index 000000000000..4e12f05fb62f --- /dev/null +++ b/ext/phar/tests/GHSA-jqcx-ccgc-xwhv.phpt @@ -0,0 +1,27 @@ +--TEST-- +GHSA-jqcx-ccgc-xwhv (Buffer overflow and overread in phar_dir_read()) +--SKIPIF-- + +--INI-- +phar.readonly=0 +--FILE-- +startBuffering(); +$phar->addFromString(str_repeat('A', PHP_MAXPATHLEN - 1), 'This is the content of file 1.'); +$phar->addFromString(str_repeat('B', PHP_MAXPATHLEN - 1).'C', 'This is the content of file 2.'); +$phar->stopBuffering(); + +$handle = opendir('phar://' . __DIR__ . '/GHSA-jqcx-ccgc-xwhv.phar'); +var_dump(strlen(readdir($handle))); +// Must not be a string of length PHP_MAXPATHLEN+1 +var_dump(readdir($handle)); +closedir($handle); +?> +--CLEAN-- + +--EXPECTF-- +int(%d) +bool(false) From c283c3ab0ba45d21b2b8745c1f9c7cbfe771c975 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 15 Jul 2023 17:33:52 +0200 Subject: [PATCH 032/120] Sanitize libxml2 globals before parsing Fixes GHSA-3qrf-m4j2-pcrr. To parse a document with libxml2, you first need to create a parsing context. The parsing context contains parsing options (e.g. XML_NOENT to substitute entities) that the application (in this case PHP) can set. Unfortunately, libxml2 also supports providing default set options. For example, if you call xmlSubstituteEntitiesDefault(1) then the XML_NOENT option will be added to the parsing options every time you create a parsing context **even if the application never requested XML_NOENT**. Third party extensions can override these globals, in particular the substitute entity global. This causes entity substitution to be unexpectedly active. Fix it by setting the parsing options to a sane known value. For API calls that depend on global state we introduce PHP_LIBXML_SANITIZE_GLOBALS() and PHP_LIBXML_RESTORE_GLOBALS(). For other APIs that work directly with a context we introduce php_libxml_sanitize_parse_ctxt_options(). --- ext/dom/document.c | 15 ++++++++ ext/dom/documentfragment.c | 2 ++ ...xml_global_state_entity_loader_bypass.phpt | 36 +++++++++++++++++++ ext/libxml/php_libxml.h | 36 +++++++++++++++++++ ext/simplexml/simplexml.c | 6 ++++ ...xml_global_state_entity_loader_bypass.phpt | 36 +++++++++++++++++++ ext/soap/php_xml.c | 2 ++ ext/xml/compat.c | 2 ++ ext/xmlreader/php_xmlreader.c | 9 +++++ ...xml_global_state_entity_loader_bypass.phpt | 35 ++++++++++++++++++ ext/xsl/xsltprocessor.c | 9 +++-- ext/zend_test/test.c | 17 +++++++++ ext/zend_test/test.stub.php | 4 +++ ext/zend_test/test_arginfo.h | 13 ++++++- 14 files changed, 216 insertions(+), 6 deletions(-) create mode 100644 ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt create mode 100644 ext/simplexml/tests/libxml_global_state_entity_loader_bypass.phpt create mode 100644 ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt diff --git a/ext/dom/document.c b/ext/dom/document.c index fa6a6377ad5c..02522b5014f2 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1254,6 +1254,7 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t so options |= XML_PARSE_NOBLANKS; } + php_libxml_sanitize_parse_ctxt_options(ctxt); xmlCtxtUseOptions(ctxt, options); ctxt->recovery = recover; @@ -1548,7 +1549,9 @@ PHP_METHOD(DOMDocument, xinclude) DOM_GET_OBJ(docp, id, xmlDocPtr, intern); + PHP_LIBXML_SANITIZE_GLOBALS(xinclude); err = xmlXIncludeProcessFlags(docp, (int)flags); + PHP_LIBXML_RESTORE_GLOBALS(xinclude); /* XML_XINCLUDE_START and XML_XINCLUDE_END nodes need to be removed as these are added via xmlXIncludeProcess to mark beginning and ending of xincluded document @@ -1586,6 +1589,7 @@ PHP_METHOD(DOMDocument, validate) DOM_GET_OBJ(docp, id, xmlDocPtr, intern); + PHP_LIBXML_SANITIZE_GLOBALS(validate); cvp = xmlNewValidCtxt(); cvp->userData = NULL; @@ -1597,6 +1601,7 @@ PHP_METHOD(DOMDocument, validate) } else { RETVAL_FALSE; } + PHP_LIBXML_RESTORE_GLOBALS(validate); xmlFreeValidCtxt(cvp); @@ -1631,14 +1636,18 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type DOM_GET_OBJ(docp, id, xmlDocPtr, intern); + PHP_LIBXML_SANITIZE_GLOBALS(new_parser_ctxt); + switch (type) { case DOM_LOAD_FILE: if (CHECK_NULL_PATH(source, source_len)) { + PHP_LIBXML_RESTORE_GLOBALS(new_parser_ctxt); zend_argument_value_error(1, "must not contain any null bytes"); RETURN_THROWS(); } valid_file = _dom_get_valid_file_path(source, resolved_path, MAXPATHLEN); if (!valid_file) { + PHP_LIBXML_RESTORE_GLOBALS(new_parser_ctxt); php_error_docref(NULL, E_WARNING, "Invalid Schema file source"); RETURN_FALSE; } @@ -1659,6 +1668,7 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type parser); sptr = xmlSchemaParse(parser); xmlSchemaFreeParserCtxt(parser); + PHP_LIBXML_RESTORE_GLOBALS(new_parser_ctxt); if (!sptr) { if (!EG(exception)) { php_error_docref(NULL, E_WARNING, "Invalid Schema"); @@ -1679,11 +1689,13 @@ static void _dom_document_schema_validate(INTERNAL_FUNCTION_PARAMETERS, int type valid_opts |= XML_SCHEMA_VAL_VC_I_CREATE; } + PHP_LIBXML_SANITIZE_GLOBALS(validate); xmlSchemaSetValidOptions(vptr, valid_opts); xmlSchemaSetValidErrors(vptr, php_libxml_error_handler, php_libxml_error_handler, vptr); is_valid = xmlSchemaValidateDoc(vptr, docp); xmlSchemaFree(sptr); xmlSchemaFreeValidCtxt(vptr); + PHP_LIBXML_RESTORE_GLOBALS(validate); if (is_valid == 0) { RETURN_TRUE; @@ -1754,12 +1766,14 @@ static void _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAMETERS, int typ return; } + PHP_LIBXML_SANITIZE_GLOBALS(parse); xmlRelaxNGSetParserErrors(parser, (xmlRelaxNGValidityErrorFunc) php_libxml_error_handler, (xmlRelaxNGValidityWarningFunc) php_libxml_error_handler, parser); sptr = xmlRelaxNGParse(parser); xmlRelaxNGFreeParserCtxt(parser); + PHP_LIBXML_RESTORE_GLOBALS(parse); if (!sptr) { php_error_docref(NULL, E_WARNING, "Invalid RelaxNG"); RETURN_FALSE; @@ -1858,6 +1872,7 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ ctxt->sax->error = php_libxml_ctx_error; ctxt->sax->warning = php_libxml_ctx_warning; } + php_libxml_sanitize_parse_ctxt_options(ctxt); if (options) { htmlCtxtUseOptions(ctxt, (int)options); } diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index 051416792d34..9a91d4dfcc01 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -114,7 +114,9 @@ PHP_METHOD(DOMDocumentFragment, appendXML) { } if (data) { + PHP_LIBXML_SANITIZE_GLOBALS(parse); err = xmlParseBalancedChunkMemory(nodep->doc, NULL, NULL, 0, (xmlChar *) data, &lst); + PHP_LIBXML_RESTORE_GLOBALS(parse); if (err != 0) { RETURN_FALSE; } diff --git a/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt b/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt new file mode 100644 index 000000000000..b28afd4694eb --- /dev/null +++ b/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt @@ -0,0 +1,36 @@ +--TEST-- +GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass) +--SKIPIF-- + +--FILE-- + %bork;]>"; + +libxml_use_internal_errors(true); + +function parseXML($xml) { + $doc = new DOMDocument(); + @$doc->loadXML($xml); + $doc->createDocumentFragment()->appendXML("&bork;"); + foreach (libxml_get_errors() as $error) { + var_dump(trim($error->message)); + } +} + +parseXML($xml); +zend_test_override_libxml_global_state(); +parseXML($xml); + +echo "Done\n"; + +?> +--EXPECT-- +string(25) "Entity 'bork' not defined" +string(25) "Entity 'bork' not defined" +string(25) "Entity 'bork' not defined" +Done diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index 85ffcd396958..d0ce7cec7144 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -118,6 +118,42 @@ PHP_LIBXML_API void php_libxml_shutdown(void); ZEND_TSRMLS_CACHE_EXTERN() #endif +/* Other extension may override the global state options, these global options + * are copied initially to ctxt->options. Set the options to a known good value. + * See libxml2 globals.c and parserInternals.c. + * The unique_name argument allows multiple sanitizes and restores within the + * same function, even nested is necessary. */ +#define PHP_LIBXML_SANITIZE_GLOBALS(unique_name) \ + int xml_old_loadsubset_##unique_name = xmlLoadExtDtdDefaultValue; \ + xmlLoadExtDtdDefaultValue = 0; \ + int xml_old_validate_##unique_name = xmlDoValidityCheckingDefaultValue; \ + xmlDoValidityCheckingDefaultValue = 0; \ + int xml_old_pedantic_##unique_name = xmlPedanticParserDefault(0); \ + int xml_old_substitute_##unique_name = xmlSubstituteEntitiesDefault(0); \ + int xml_old_linenrs_##unique_name = xmlLineNumbersDefault(0); \ + int xml_old_blanks_##unique_name = xmlKeepBlanksDefault(1); + +#define PHP_LIBXML_RESTORE_GLOBALS(unique_name) \ + xmlLoadExtDtdDefaultValue = xml_old_loadsubset_##unique_name; \ + xmlDoValidityCheckingDefaultValue = xml_old_validate_##unique_name; \ + (void) xmlPedanticParserDefault(xml_old_pedantic_##unique_name); \ + (void) xmlSubstituteEntitiesDefault(xml_old_substitute_##unique_name); \ + (void) xmlLineNumbersDefault(xml_old_linenrs_##unique_name); \ + (void) xmlKeepBlanksDefault(xml_old_blanks_##unique_name); + +/* Alternative for above, working directly on the context and not setting globals. + * Generally faster because no locking is involved, and this has the advantage that it sets the options to a known good value. */ +static zend_always_inline void php_libxml_sanitize_parse_ctxt_options(xmlParserCtxtPtr ctxt) +{ + ctxt->loadsubset = 0; + ctxt->validate = 0; + ctxt->pedantic = 0; + ctxt->replaceEntities = 0; + ctxt->linenumbers = 0; + ctxt->keepBlanks = 1; + ctxt->options = 0; +} + #else /* HAVE_LIBXML */ #define libxml_module_ptr NULL #endif diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 21e1190e681b..6e0b1e91c498 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -2278,7 +2278,9 @@ PHP_FUNCTION(simplexml_load_file) RETURN_THROWS(); } + PHP_LIBXML_SANITIZE_GLOBALS(read_file); docp = xmlReadFile(filename, NULL, (int)options); + PHP_LIBXML_RESTORE_GLOBALS(read_file); if (!docp) { RETURN_FALSE; @@ -2331,7 +2333,9 @@ PHP_FUNCTION(simplexml_load_string) RETURN_THROWS(); } + PHP_LIBXML_SANITIZE_GLOBALS(read_memory); docp = xmlReadMemory(data, (int)data_len, NULL, NULL, (int)options); + PHP_LIBXML_RESTORE_GLOBALS(read_memory); if (!docp) { RETURN_FALSE; @@ -2380,7 +2384,9 @@ SXE_METHOD(__construct) RETURN_THROWS(); } + PHP_LIBXML_SANITIZE_GLOBALS(read_file_or_memory); docp = is_url ? xmlReadFile(data, NULL, (int)options) : xmlReadMemory(data, (int)data_len, NULL, NULL, (int)options); + PHP_LIBXML_RESTORE_GLOBALS(read_file_or_memory); if (!docp) { ((php_libxml_node_object *)sxe)->document = NULL; diff --git a/ext/simplexml/tests/libxml_global_state_entity_loader_bypass.phpt b/ext/simplexml/tests/libxml_global_state_entity_loader_bypass.phpt new file mode 100644 index 000000000000..2152e0123286 --- /dev/null +++ b/ext/simplexml/tests/libxml_global_state_entity_loader_bypass.phpt @@ -0,0 +1,36 @@ +--TEST-- +GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass) +--SKIPIF-- + +--FILE-- + %bork;]>"; + +libxml_use_internal_errors(true); +zend_test_override_libxml_global_state(); + +echo "--- String test ---\n"; +simplexml_load_string($xml); +echo "--- Constructor test ---\n"; +new SimpleXMLElement($xml); +echo "--- File test ---\n"; +file_put_contents("libxml_global_state_entity_loader_bypass.tmp", $xml); +simplexml_load_file("libxml_global_state_entity_loader_bypass.tmp"); + +echo "Done\n"; + +?> +--CLEAN-- + +--EXPECT-- +--- String test --- +--- Constructor test --- +--- File test --- +Done diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c index e290786f7afc..ed3495c1266c 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -91,6 +91,7 @@ xmlDocPtr soap_xmlParseFile(const char *filename) if (ctxt) { zend_bool old; + php_libxml_sanitize_parse_ctxt_options(ctxt); ctxt->keepBlanks = 0; ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; ctxt->sax->comment = soap_Comment; @@ -139,6 +140,7 @@ xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size) if (ctxt) { zend_bool old; + php_libxml_sanitize_parse_ctxt_options(ctxt); ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; ctxt->sax->comment = soap_Comment; ctxt->sax->warning = NULL; diff --git a/ext/xml/compat.c b/ext/xml/compat.c index dcdd964334c5..3b2a0cdf7fb3 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -17,6 +17,7 @@ #include "php.h" #if defined(HAVE_LIBXML) && (defined(HAVE_XML) || defined(HAVE_XMLRPC)) && !defined(HAVE_LIBEXPAT) #include "expat_compat.h" +#include "ext/libxml/php_libxml.h" typedef struct _php_xml_ns { xmlNsPtr nsptr; @@ -469,6 +470,7 @@ XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *m return NULL; } + php_libxml_sanitize_parse_ctxt_options(parser->parser); xmlCtxtUseOptions(parser->parser, XML_PARSE_OLDSAX); parser->parser->replaceEntities = 1; diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index d8f8105010c7..77f0c10db319 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -284,6 +284,7 @@ static xmlRelaxNGPtr _xmlreader_get_relaxNG(char *source, size_t source_len, siz return NULL; } + PHP_LIBXML_SANITIZE_GLOBALS(parse); if (error_func || warn_func) { xmlRelaxNGSetParserErrors(parser, (xmlRelaxNGValidityErrorFunc) error_func, @@ -292,6 +293,7 @@ static xmlRelaxNGPtr _xmlreader_get_relaxNG(char *source, size_t source_len, siz } sptr = xmlRelaxNGParse(parser); xmlRelaxNGFreeParserCtxt(parser); + PHP_LIBXML_RESTORE_GLOBALS(parse); return sptr; } @@ -872,7 +874,9 @@ PHP_METHOD(XMLReader, open) valid_file = _xmlreader_get_valid_file_path(source, resolved_path, MAXPATHLEN ); if (valid_file) { + PHP_LIBXML_SANITIZE_GLOBALS(reader_for_file); reader = xmlReaderForFile(valid_file, encoding, options); + PHP_LIBXML_RESTORE_GLOBALS(reader_for_file); } if (reader == NULL) { @@ -945,7 +949,9 @@ PHP_METHOD(XMLReader, setSchema) intern = Z_XMLREADER_P(id); if (intern && intern->ptr) { + PHP_LIBXML_SANITIZE_GLOBALS(schema); retval = xmlTextReaderSchemaValidate(intern->ptr, source); + PHP_LIBXML_RESTORE_GLOBALS(schema); if (retval == 0) { RETURN_TRUE; @@ -1068,6 +1074,7 @@ PHP_METHOD(XMLReader, XML) } uri = (char *) xmlCanonicPath((const xmlChar *) resolved_path); } + PHP_LIBXML_SANITIZE_GLOBALS(text_reader); reader = xmlNewTextReader(inputbfr, uri); if (reader != NULL) { @@ -1086,9 +1093,11 @@ PHP_METHOD(XMLReader, XML) xmlFree(uri); } + PHP_LIBXML_RESTORE_GLOBALS(text_reader); return; } } + PHP_LIBXML_RESTORE_GLOBALS(text_reader); } if (uri) { diff --git a/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt b/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt new file mode 100644 index 000000000000..e9ffb04c2bb9 --- /dev/null +++ b/ext/xmlreader/tests/libxml_global_state_entity_loader_bypass.phpt @@ -0,0 +1,35 @@ +--TEST-- +GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass) +--SKIPIF-- + +--FILE-- + %bork;]>"; + +libxml_use_internal_errors(true); +zend_test_override_libxml_global_state(); + +echo "--- String test ---\n"; +$reader = XMLReader::xml($xml); +$reader->read(); +echo "--- File test ---\n"; +file_put_contents("libxml_global_state_entity_loader_bypass.tmp", $xml); +$reader = XMLReader::open("libxml_global_state_entity_loader_bypass.tmp"); +$reader->read(); + +echo "Done\n"; + +?> +--CLEAN-- + +--EXPECT-- +--- String test --- +--- File test --- +Done diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index 9498ba576c6e..6f17c8fc6425 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -315,7 +315,7 @@ PHP_METHOD(XSLTProcessor, importStylesheet) xmlDoc *doc = NULL, *newdoc = NULL; xsltStylesheetPtr sheetp, oldsheetp; xsl_object *intern; - int prevSubstValue, prevExtDtdValue, clone_docu = 0; + int clone_docu = 0; xmlNode *nodep = NULL; zval *cloneDocu, rv; zend_string *member; @@ -339,13 +339,12 @@ PHP_METHOD(XSLTProcessor, importStylesheet) stylesheet document otherwise the node proxies will be a mess */ newdoc = xmlCopyDoc(doc, 1); xmlNodeSetBase((xmlNodePtr) newdoc, (xmlChar *)doc->URL); - prevSubstValue = xmlSubstituteEntitiesDefault(1); - prevExtDtdValue = xmlLoadExtDtdDefaultValue; + PHP_LIBXML_SANITIZE_GLOBALS(parse); + xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS; sheetp = xsltParseStylesheetDoc(newdoc); - xmlSubstituteEntitiesDefault(prevSubstValue); - xmlLoadExtDtdDefaultValue = prevExtDtdValue; + PHP_LIBXML_RESTORE_GLOBALS(parse); if (!sheetp) { xmlFreeDoc(newdoc); diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 69578e0ad1a5..ca8782c546cf 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -29,6 +29,11 @@ #include "zend_smart_str.h" #include "zend_weakrefs.h" +#ifdef HAVE_LIBXML +# include +# include +#endif + ZEND_BEGIN_MODULE_GLOBALS(zend_test) int observer_enabled; int observer_show_output; @@ -270,6 +275,18 @@ static ZEND_FUNCTION(zend_get_current_func_name) RETURN_STR(function_name); } +static ZEND_FUNCTION(zend_test_override_libxml_global_state) +{ + ZEND_PARSE_PARAMETERS_NONE(); + + xmlLoadExtDtdDefaultValue = 1; + xmlDoValidityCheckingDefaultValue = 1; + (void) xmlPedanticParserDefault(1); + (void) xmlSubstituteEntitiesDefault(1); + (void) xmlLineNumbersDefault(1); + (void) xmlKeepBlanksDefault(0); +} + /* TESTS Z_PARAM_ITERABLE and Z_PARAM_ITERABLE_OR_NULL */ static ZEND_FUNCTION(zend_iterable) { diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index 812688ac02ff..fe917dbc8dd9 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -68,6 +68,10 @@ function zend_weakmap_dump(): array {} function zend_get_current_func_name(): string {} +#ifdef HAVE_LIBXML +function zend_test_override_libxml_global_state(): void {} +#endif + } namespace ZendTestNS { diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index c3a8d98a8c50..73a844583932 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 1f8834339ebf0d56d2e4ec7f3d27d837f61ba5ef */ + * Stub hash: 8cfd05fb9f7524837d23f92b185fcd30f964521f */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -65,6 +65,11 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_get_current_func_name, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() +#if defined(HAVE_LIBXML) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_override_libxml_global_state, 0, 0, IS_VOID, 0) +ZEND_END_ARG_INFO() +#endif + ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_ZendSubNS_namespaced_func, 0, 0, _IS_BOOL, 0) ZEND_END_ARG_INFO() @@ -101,6 +106,9 @@ static ZEND_FUNCTION(zend_weakmap_attach); static ZEND_FUNCTION(zend_weakmap_remove); static ZEND_FUNCTION(zend_weakmap_dump); static ZEND_FUNCTION(zend_get_current_func_name); +#if defined(HAVE_LIBXML) +static ZEND_FUNCTION(zend_test_override_libxml_global_state); +#endif static ZEND_FUNCTION(namespaced_func); static ZEND_METHOD(_ZendTestClass, is_object); static ZEND_METHOD(_ZendTestClass, __toString); @@ -128,6 +136,9 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(zend_weakmap_remove, arginfo_zend_weakmap_remove) ZEND_FE(zend_weakmap_dump, arginfo_zend_weakmap_dump) ZEND_FE(zend_get_current_func_name, arginfo_zend_get_current_func_name) +#if defined(HAVE_LIBXML) + ZEND_FE(zend_test_override_libxml_global_state, arginfo_zend_test_override_libxml_global_state) +#endif ZEND_NS_FE("ZendTestNS2\\ZendSubNS", namespaced_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_func) ZEND_FE_END }; From 93b43ac2380f5e8ae44fe854c0f4896d7e012af6 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 31 Jul 2023 20:05:12 +0100 Subject: [PATCH 033/120] Fix broken merge --- ext/zend_test/test.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index b8472780f5bc..50b6251736fb 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -36,22 +36,6 @@ # include #endif -ZEND_BEGIN_MODULE_GLOBALS(zend_test) - int observer_enabled; - int observer_show_output; - int observer_observe_all; - int observer_observe_includes; - int observer_observe_functions; - zend_array *observer_observe_function_names; - int observer_show_return_type; - int observer_show_return_value; - int observer_show_init_backtrace; - int observer_show_opcode; - int observer_nesting_depth; - int replace_zend_execute_ex; - HashTable global_weakmap; -ZEND_END_MODULE_GLOBALS(zend_test) - ZEND_DECLARE_MODULE_GLOBALS(zend_test) static zend_class_entry *zend_test_interface; From dcc429557d19dcdc476790e6271707f5baa4b600 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 31 Jul 2023 20:08:45 +0100 Subject: [PATCH 034/120] Fixed artifacts from merging --- ext/zend_test/test_arginfo.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 6793206e1c49..6a69318c7738 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -104,16 +104,15 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_crash, 0, 0, IS_VOID, ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, message, IS_STRING, 1, "null") ZEND_END_ARG_INFO() -<<<<<<< HEAD ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_namespaced_func, 0, 0, _IS_BOOL, 0) -======= +ZEND_END_ARG_INFO() + #if defined(HAVE_LIBXML) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_override_libxml_global_state, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ZendTestNS2_ZendSubNS_namespaced_func, 0, 0, _IS_BOOL, 0) ->>>>>>> PHP-8.1 ZEND_END_ARG_INFO() #define arginfo_ZendTestNS2_namespaced_deprecated_func arginfo_zend_test_void_return From 855dd2767a08e4394d45c32474011cbff26ec503 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 31 Jul 2023 20:24:20 +0100 Subject: [PATCH 035/120] Fixed another broken merge (sorry) --- ext/zend_test/test_arginfo.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 6a69318c7738..196d4c63c2b6 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -212,7 +212,6 @@ static ZEND_FUNCTION(ZendTestNS2_ZendSubNS_namespaced_deprecated_func); #if defined(HAVE_LIBXML) static ZEND_FUNCTION(zend_test_override_libxml_global_state); #endif -static ZEND_FUNCTION(namespaced_func); static ZEND_METHOD(_ZendTestClass, is_object); static ZEND_METHOD(_ZendTestClass, __toString); static ZEND_METHOD(_ZendTestClass, returnsStatic); @@ -270,7 +269,6 @@ static const zend_function_entry ext_functions[] = { ZEND_NS_DEP_FALIAS("ZendTestNS2\\ZendSubNS", namespaced_deprecated_func, ZendTestNS2_ZendSubNS_namespaced_deprecated_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_func) ZEND_NS_FALIAS("ZendTestNS2\\ZendSubNS", namespaced_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_ZendSubNS_namespaced_aliased_func) ZEND_NS_DEP_FALIAS("ZendTestNS2\\ZendSubNS", namespaced_deprecated_aliased_func, zend_test_void_return, arginfo_ZendTestNS2_ZendSubNS_namespaced_deprecated_aliased_func) - ZEND_NS_FE("ZendTestNS2\\ZendSubNS", namespaced_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_func) #if defined(HAVE_LIBXML) ZEND_FE(zend_test_override_libxml_global_state, arginfo_zend_test_override_libxml_global_state) #endif From a53e56176c746dd9e7d7104eaaab9c33876e784f Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Mon, 31 Jul 2023 22:41:49 +0100 Subject: [PATCH 036/120] Remove unnecessary parentheses around language constructs in oci8 --- ext/oci8/tests/array_bind_001.phpt | 2 +- ext/oci8/tests/array_bind_002.phpt | 2 +- ext/oci8/tests/array_bind_003.phpt | 4 ++-- ext/oci8/tests/array_bind_004.phpt | 4 ++-- ext/oci8/tests/array_bind_005.phpt | 4 ++-- ext/oci8/tests/array_bind_006.phpt | 4 ++-- ext/oci8/tests/array_bind_007.phpt | 2 +- ext/oci8/tests/array_bind_008.phpt | 4 ++-- ext/oci8/tests/array_bind_009.phpt | 2 +- ext/oci8/tests/array_bind_010.phpt | 2 +- ext/oci8/tests/array_bind_011.phpt | 2 +- ext/oci8/tests/array_bind_012.phpt | 2 +- ext/oci8/tests/array_bind_013.phpt | 2 +- ext/oci8/tests/array_bind_014.phpt | 4 ++-- ext/oci8/tests/array_bind_bdouble.phpt | 4 ++-- ext/oci8/tests/array_bind_bfloat.phpt | 4 ++-- ext/oci8/tests/array_bind_date.phpt | 4 ++-- ext/oci8/tests/array_bind_date1.phpt | 4 ++-- ext/oci8/tests/array_bind_float.phpt | 4 ++-- ext/oci8/tests/array_bind_float1.phpt | 4 ++-- ext/oci8/tests/array_bind_int.phpt | 4 ++-- ext/oci8/tests/array_bind_int1.phpt | 4 ++-- ext/oci8/tests/array_bind_str.phpt | 4 ++-- ext/oci8/tests/array_bind_str1.phpt | 4 ++-- ext/oci8/tests/array_bind_uin.phpt | 4 ++-- ext/oci8/tests/b47243_1.phpt | 6 +++--- ext/oci8/tests/b47243_2.phpt | 6 +++--- ext/oci8/tests/b47243_3.phpt | 6 +++--- ext/oci8/tests/bind_boolean_1.phpt | 6 +++--- ext/oci8/tests/bind_char_1.phpt | 6 +++--- ext/oci8/tests/bind_char_2.phpt | 6 +++--- ext/oci8/tests/bind_char_3.phpt | 6 +++--- ext/oci8/tests/bind_char_4.phpt | 6 +++--- ext/oci8/tests/bind_empty.phpt | 2 +- ext/oci8/tests/bind_long.phpt | 6 +++--- ext/oci8/tests/bind_long_raw.phpt | 4 ++-- ext/oci8/tests/bind_misccoltypes.phpt | 6 +++--- ext/oci8/tests/bind_misccoltypes_errs.phpt | 4 ++-- ext/oci8/tests/bind_number.phpt | 4 ++-- ext/oci8/tests/bind_query.phpt | 4 ++-- ext/oci8/tests/bind_raw.phpt | 4 ++-- ext/oci8/tests/bind_raw_2.phpt | 4 ++-- ext/oci8/tests/bind_rowid.phpt | 4 ++-- ext/oci8/tests/bind_sqltafc.phpt | 4 ++-- ext/oci8/tests/bind_sqltchr_1.phpt | 4 ++-- ext/oci8/tests/bind_sqltchr_2.phpt | 4 ++-- ext/oci8/tests/bind_sqltint.phpt | 4 ++-- ext/oci8/tests/bind_sqltnum.phpt | 4 ++-- ext/oci8/tests/bind_unsupported_1.phpt | 4 ++-- ext/oci8/tests/bind_unsupported_2.phpt | 4 ++-- ext/oci8/tests/bind_unsupported_3.phpt | 6 +++--- ext/oci8/tests/bug26133.phpt | 4 ++-- ext/oci8/tests/bug27303_1.phpt | 6 +++--- ext/oci8/tests/bug27303_2.phpt | 4 ++-- ext/oci8/tests/bug27303_3.phpt | 2 +- ext/oci8/tests/bug27303_4.phpt | 4 ++-- ext/oci8/tests/bug32325.phpt | 6 +++--- ext/oci8/tests/bug35973.phpt | 4 ++-- ext/oci8/tests/bug36010.phpt | 4 ++-- ext/oci8/tests/bug36096.phpt | 2 +- ext/oci8/tests/bug36403.phpt | 4 ++-- ext/oci8/tests/bug37220.phpt | 4 ++-- ext/oci8/tests/bug37581.phpt | 4 ++-- ext/oci8/tests/bug38161.phpt | 2 +- ext/oci8/tests/bug38173.phpt | 4 ++-- ext/oci8/tests/bug40078.phpt | 4 ++-- ext/oci8/tests/bug40415.phpt | 4 ++-- ext/oci8/tests/bug41069.phpt | 6 +++--- ext/oci8/tests/bug42134.phpt | 6 +++--- ext/oci8/tests/bug42173.phpt | 6 +++--- ext/oci8/tests/bug42496_1.phpt | 4 ++-- ext/oci8/tests/bug42496_2.phpt | 4 ++-- ext/oci8/tests/bug42841.phpt | 4 ++-- ext/oci8/tests/bug43492.phpt | 4 ++-- ext/oci8/tests/bug43492_2.phpt | 4 ++-- ext/oci8/tests/bug43497.phpt | 4 ++-- ext/oci8/tests/bug44008.phpt | 4 ++-- ext/oci8/tests/bug44113.phpt | 6 +++--- ext/oci8/tests/bug44206.phpt | 4 ++-- ext/oci8/tests/bug45458.phpt | 4 ++-- ext/oci8/tests/bug46994.phpt | 6 +++--- ext/oci8/tests/bug47189.phpt | 6 +++--- ext/oci8/tests/bug47281.phpt | 6 +++--- ext/oci8/tests/bug47281_tt.phpt | 6 +++--- ext/oci8/tests/bug51253.phpt | 6 +++--- ext/oci8/tests/bug51291_1.phpt | 4 ++-- ext/oci8/tests/bug51291_2.phpt | 6 +++--- ext/oci8/tests/bug68298.phpt | 4 ++-- ext/oci8/tests/bug70700.phpt | 6 +++--- ext/oci8/tests/bug71148.phpt | 6 +++--- ext/oci8/tests/bug71422.phpt | 4 ++-- ext/oci8/tests/bug71600.phpt | 6 +++--- ext/oci8/tests/bug72524.phpt | 6 +++--- ext/oci8/tests/bug74625.phpt | 4 ++-- ext/oci8/tests/calltimeout1.phpt | 6 +++--- ext/oci8/tests/close.phpt | 2 +- ext/oci8/tests/coll_001.phpt | 4 ++-- ext/oci8/tests/coll_002.phpt | 4 ++-- ext/oci8/tests/coll_002_func.phpt | 4 ++-- ext/oci8/tests/coll_003.phpt | 4 ++-- ext/oci8/tests/coll_003_func.phpt | 4 ++-- ext/oci8/tests/coll_004.phpt | 4 ++-- ext/oci8/tests/coll_004_func.phpt | 4 ++-- ext/oci8/tests/coll_009.phpt | 4 ++-- ext/oci8/tests/coll_009_func.phpt | 4 ++-- ext/oci8/tests/coll_010.phpt | 4 ++-- ext/oci8/tests/coll_010_func.phpt | 4 ++-- ext/oci8/tests/coll_011.phpt | 4 ++-- ext/oci8/tests/coll_011_func.phpt | 4 ++-- ext/oci8/tests/coll_012.phpt | 4 ++-- ext/oci8/tests/coll_012_func.phpt | 4 ++-- ext/oci8/tests/coll_013.phpt | 4 ++-- ext/oci8/tests/coll_013_func.phpt | 4 ++-- ext/oci8/tests/coll_014.phpt | 4 ++-- ext/oci8/tests/coll_014_func.phpt | 4 ++-- ext/oci8/tests/coll_015.phpt | 4 ++-- ext/oci8/tests/coll_015_func.phpt | 4 ++-- ext/oci8/tests/coll_016.phpt | 4 ++-- ext/oci8/tests/coll_016_func.phpt | 4 ++-- ext/oci8/tests/coll_017.phpt | 4 ++-- ext/oci8/tests/coll_017_func.phpt | 4 ++-- ext/oci8/tests/coll_018.phpt | 4 ++-- ext/oci8/tests/coll_019.phpt | 4 ++-- ext/oci8/tests/commit_001.phpt | 10 +++++----- ext/oci8/tests/commit_002.phpt | 6 +++--- ext/oci8/tests/conn_attr.inc | 2 +- ext/oci8/tests/conn_attr_1.phpt | 6 +++--- ext/oci8/tests/conn_attr_2.phpt | 6 +++--- ext/oci8/tests/conn_attr_3.phpt | 6 +++--- ext/oci8/tests/conn_attr_4.phpt | 6 +++--- ext/oci8/tests/conn_attr_5.phpt | 6 +++--- ext/oci8/tests/connect.inc | 2 +- ext/oci8/tests/connect.phpt | 2 +- ext/oci8/tests/connect_1.phpt | 2 +- ext/oci8/tests/connect_scope1.phpt | 4 ++-- ext/oci8/tests/connect_scope2.phpt | 4 ++-- ext/oci8/tests/connect_scope_try1.phpt | 4 ++-- ext/oci8/tests/connect_scope_try2.phpt | 4 ++-- ext/oci8/tests/connect_scope_try3.phpt | 4 ++-- ext/oci8/tests/connect_scope_try4.phpt | 4 ++-- ext/oci8/tests/connect_scope_try5.phpt | 4 ++-- ext/oci8/tests/connect_scope_try6.phpt | 4 ++-- ext/oci8/tests/connect_with_charset_001.phpt | 2 +- ext/oci8/tests/connect_without_oracle_home_11.phpt | 2 +- ext/oci8/tests/cursor_bind.phpt | 6 +++--- ext/oci8/tests/cursor_bind_err.phpt | 6 +++--- ext/oci8/tests/cursors.phpt | 4 ++-- ext/oci8/tests/db_op_1.phpt | 6 +++--- ext/oci8/tests/db_op_2.phpt | 6 +++--- ext/oci8/tests/dbmsoutput.phpt | 6 +++--- ext/oci8/tests/default_prefetch0.phpt | 4 ++-- ext/oci8/tests/default_prefetch1.phpt | 4 ++-- ext/oci8/tests/default_prefetch2.phpt | 4 ++-- ext/oci8/tests/define.phpt | 4 ++-- ext/oci8/tests/define0.phpt | 4 ++-- ext/oci8/tests/define1.phpt | 4 ++-- ext/oci8/tests/define2.phpt | 6 +++--- ext/oci8/tests/define3.phpt | 6 +++--- ext/oci8/tests/define4.phpt | 4 ++-- ext/oci8/tests/define5.phpt | 4 ++-- ext/oci8/tests/define6.phpt | 6 +++--- ext/oci8/tests/descriptors.phpt | 4 ++-- ext/oci8/tests/details.inc | 2 +- ext/oci8/tests/drcp_cclass1.phpt | 6 +++--- ext/oci8/tests/drcp_characterset.phpt | 2 +- ext/oci8/tests/drcp_conn_close1.phpt | 2 +- ext/oci8/tests/drcp_conn_close2.phpt | 2 +- ext/oci8/tests/drcp_connect1.phpt | 4 ++-- ext/oci8/tests/drcp_newconnect.phpt | 2 +- ext/oci8/tests/drcp_pconn_close1.phpt | 2 +- ext/oci8/tests/drcp_pconn_close2.phpt | 2 +- ext/oci8/tests/drcp_privileged.phpt | 4 ++-- ext/oci8/tests/drcp_scope1.phpt | 2 +- ext/oci8/tests/drcp_scope2.phpt | 2 +- ext/oci8/tests/drcp_scope3.phpt | 2 +- ext/oci8/tests/drcp_scope4.phpt | 2 +- ext/oci8/tests/drcp_scope5.phpt | 2 +- ext/oci8/tests/driver_name.phpt | 6 +++--- ext/oci8/tests/driver_name_11gR2.phpt | 6 +++--- ext/oci8/tests/dupcolnames.phpt | 4 ++-- ext/oci8/tests/edition_1.phpt | 6 +++--- ext/oci8/tests/edition_2.phpt | 6 +++--- ext/oci8/tests/error.phpt | 4 ++-- ext/oci8/tests/error2.phpt | 6 +++--- ext/oci8/tests/error3.phpt | 6 +++--- ext/oci8/tests/error_bind.phpt | 4 ++-- ext/oci8/tests/error_bind_2.phpt | 6 +++--- ext/oci8/tests/error_bind_3.phpt | 6 +++--- ext/oci8/tests/error_parse.phpt | 4 ++-- ext/oci8/tests/error_set.phpt | 4 ++-- ext/oci8/tests/exec_fetch.phpt | 2 +- ext/oci8/tests/execute_mode.phpt | 2 +- ext/oci8/tests/fetch.phpt | 4 ++-- ext/oci8/tests/fetch_all1.phpt | 4 ++-- ext/oci8/tests/fetch_all2.phpt | 4 ++-- ext/oci8/tests/fetch_all3.phpt | 4 ++-- ext/oci8/tests/fetch_all4.phpt | 4 ++-- ext/oci8/tests/fetch_all5.phpt | 4 ++-- ext/oci8/tests/fetch_array.phpt | 4 ++-- ext/oci8/tests/fetch_assoc.phpt | 2 +- ext/oci8/tests/fetch_object.phpt | 6 +++--- ext/oci8/tests/fetch_object_1.phpt | 6 +++--- ext/oci8/tests/fetch_object_2.phpt | 6 +++--- ext/oci8/tests/fetch_row.phpt | 4 ++-- ext/oci8/tests/field_funcs.phpt | 4 ++-- ext/oci8/tests/field_funcs1.phpt | 4 ++-- ext/oci8/tests/field_funcs2.phpt | 4 ++-- ext/oci8/tests/field_funcs3.phpt | 4 ++-- ext/oci8/tests/imp_res_1.phpt | 6 +++--- ext/oci8/tests/imp_res_2.phpt | 6 +++--- ext/oci8/tests/imp_res_3.phpt | 6 +++--- ext/oci8/tests/imp_res_4.phpt | 6 +++--- ext/oci8/tests/imp_res_5.phpt | 6 +++--- ext/oci8/tests/imp_res_6.phpt | 6 +++--- ext/oci8/tests/imp_res_7.phpt | 6 +++--- ext/oci8/tests/imp_res_call_error.phpt | 6 +++--- ext/oci8/tests/imp_res_cancel.phpt | 6 +++--- ext/oci8/tests/imp_res_close.phpt | 6 +++--- ext/oci8/tests/imp_res_cursor.phpt | 6 +++--- ext/oci8/tests/imp_res_dbmsoutput.phpt | 6 +++--- ext/oci8/tests/imp_res_field.phpt | 6 +++--- ext/oci8/tests/imp_res_func_error.phpt | 6 +++--- ext/oci8/tests/imp_res_get_1.phpt | 6 +++--- ext/oci8/tests/imp_res_get_2.phpt | 6 +++--- ext/oci8/tests/imp_res_get_3.phpt | 6 +++--- ext/oci8/tests/imp_res_get_4.phpt | 6 +++--- ext/oci8/tests/imp_res_get_5.phpt | 6 +++--- ext/oci8/tests/imp_res_get_all.phpt | 6 +++--- ext/oci8/tests/imp_res_get_cancel.phpt | 6 +++--- ext/oci8/tests/imp_res_get_close_1.phpt | 6 +++--- ext/oci8/tests/imp_res_get_close_2.phpt | 6 +++--- ext/oci8/tests/imp_res_get_close_3.phpt | 6 +++--- ext/oci8/tests/imp_res_get_cursor.phpt | 6 +++--- ext/oci8/tests/imp_res_get_dbmsoutput.phpt | 6 +++--- ext/oci8/tests/imp_res_get_exec.phpt | 6 +++--- ext/oci8/tests/imp_res_get_none.phpt | 6 +++--- ext/oci8/tests/imp_res_insert.phpt | 6 +++--- ext/oci8/tests/imp_res_lob.phpt | 6 +++--- ext/oci8/tests/imp_res_prefetch.phpt | 6 +++--- ext/oci8/tests/lob_001.phpt | 6 +++--- ext/oci8/tests/lob_002.phpt | 6 +++--- ext/oci8/tests/lob_003.phpt | 4 ++-- ext/oci8/tests/lob_004.phpt | 4 ++-- ext/oci8/tests/lob_005.phpt | 4 ++-- ext/oci8/tests/lob_006.phpt | 8 ++++---- ext/oci8/tests/lob_007.phpt | 4 ++-- ext/oci8/tests/lob_008.phpt | 4 ++-- ext/oci8/tests/lob_009.phpt | 4 ++-- ext/oci8/tests/lob_010.phpt | 4 ++-- ext/oci8/tests/lob_011.phpt | 4 ++-- ext/oci8/tests/lob_012.phpt | 4 ++-- ext/oci8/tests/lob_013.phpt | 4 ++-- ext/oci8/tests/lob_014.phpt | 4 ++-- ext/oci8/tests/lob_016.phpt | 4 ++-- ext/oci8/tests/lob_017.phpt | 4 ++-- ext/oci8/tests/lob_018.phpt | 6 +++--- ext/oci8/tests/lob_019.phpt | 4 ++-- ext/oci8/tests/lob_020.phpt | 4 ++-- ext/oci8/tests/lob_021.phpt | 4 ++-- ext/oci8/tests/lob_022.phpt | 4 ++-- ext/oci8/tests/lob_023.phpt | 4 ++-- ext/oci8/tests/lob_024.phpt | 4 ++-- ext/oci8/tests/lob_025.phpt | 4 ++-- ext/oci8/tests/lob_026.phpt | 4 ++-- ext/oci8/tests/lob_027.phpt | 4 ++-- ext/oci8/tests/lob_028.phpt | 4 ++-- ext/oci8/tests/lob_029.phpt | 6 +++--- ext/oci8/tests/lob_030.phpt | 4 ++-- ext/oci8/tests/lob_031.phpt | 4 ++-- ext/oci8/tests/lob_032.phpt | 4 ++-- ext/oci8/tests/lob_033.phpt | 4 ++-- ext/oci8/tests/lob_034.phpt | 4 ++-- ext/oci8/tests/lob_035.phpt | 4 ++-- ext/oci8/tests/lob_036.phpt | 4 ++-- ext/oci8/tests/lob_037.phpt | 4 ++-- ext/oci8/tests/lob_038.phpt | 4 ++-- ext/oci8/tests/lob_039.phpt | 4 ++-- ext/oci8/tests/lob_040.phpt | 8 ++++---- ext/oci8/tests/lob_041.phpt | 4 ++-- ext/oci8/tests/lob_042.phpt | 10 +++++----- ext/oci8/tests/lob_043.phpt | 6 +++--- ext/oci8/tests/lob_044.phpt | 6 +++--- ext/oci8/tests/lob_null.phpt | 4 ++-- ext/oci8/tests/lob_prefetch.phpt | 4 ++-- ext/oci8/tests/lob_prefetch_ini.phpt | 4 ++-- ext/oci8/tests/lob_temp.phpt | 4 ++-- ext/oci8/tests/lob_temp1.phpt | 4 ++-- ext/oci8/tests/lob_temp2.phpt | 8 ++++---- ext/oci8/tests/null_byte_1.phpt | 4 ++-- ext/oci8/tests/null_byte_2.phpt | 6 +++--- ext/oci8/tests/null_byte_3.phpt | 4 ++-- ext/oci8/tests/num.phpt | 4 ++-- ext/oci8/tests/oci_execute_segfault.phpt | 4 ++-- ext/oci8/tests/old_oci_close.phpt | 2 +- ext/oci8/tests/old_oci_close1.phpt | 2 +- ext/oci8/tests/password.phpt | 6 +++--- ext/oci8/tests/password_2.phpt | 6 +++--- ext/oci8/tests/password_new.phpt | 6 +++--- ext/oci8/tests/pecl_bug10194.phpt | 4 ++-- ext/oci8/tests/pecl_bug10194_blob.phpt | 8 ++++---- ext/oci8/tests/pecl_bug10194_blob_64.phpt | 4 ++-- ext/oci8/tests/pecl_bug16842.phpt | 6 +++--- ext/oci8/tests/pecl_bug6109.phpt | 4 ++-- ext/oci8/tests/pecl_bug8816.phpt | 4 ++-- ext/oci8/tests/persistent.phpt | 2 +- ext/oci8/tests/prefetch.phpt | 4 ++-- ext/oci8/tests/privileged_connect.phpt | 2 +- ext/oci8/tests/privileged_connect1.phpt | 2 +- ext/oci8/tests/refcur_prefetch_1.phpt | 6 +++--- ext/oci8/tests/refcur_prefetch_2.phpt | 4 ++-- ext/oci8/tests/refcur_prefetch_3.phpt | 4 ++-- ext/oci8/tests/refcur_prefetch_4.phpt | 4 ++-- ext/oci8/tests/select_null.phpt | 2 +- ext/oci8/tests/serverversion.phpt | 2 +- ext/oci8/tests/skipif.inc | 2 +- ext/oci8/tests/skipifconnectfailure.inc | 2 +- ext/oci8/tests/statement_cache.phpt | 4 ++-- ext/oci8/tests/statement_type.phpt | 2 +- ext/oci8/tests/testping.phpt | 4 ++-- ext/oci8/tests/uncommitted.phpt | 2 +- ext/oci8/tests/xmltype_01.phpt | 6 +++--- ext/oci8/tests/xmltype_02.phpt | 6 +++--- 322 files changed, 712 insertions(+), 712 deletions(-) diff --git a/ext/oci8/tests/array_bind_001.phpt b/ext/oci8/tests/array_bind_001.phpt index 13c000e35ddf..1404a1593f43 100644 --- a/ext/oci8/tests/array_bind_001.phpt +++ b/ext/oci8/tests/array_bind_001.phpt @@ -4,7 +4,7 @@ oci_bind_array_by_name() and invalid values 1 oci8 --SKIPIF-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (!defined('SQLT_BDOUBLE')) die('skip SQLT_BDOUBLE type not available on older Oracle clients'); ?> --FILE-- diff --git a/ext/oci8/tests/array_bind_bfloat.phpt b/ext/oci8/tests/array_bind_bfloat.phpt index 902bd48e5fb2..b00bd56328ab 100644 --- a/ext/oci8/tests/array_bind_bfloat.phpt +++ b/ext/oci8/tests/array_bind_bfloat.phpt @@ -4,9 +4,9 @@ Unsupported type: oci_bind_array_by_name() and SQLT_BFLOAT oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (!defined('SQLT_BFLOAT')) die('skip SQLT_BFLOAT type not available on older Oracle clients'); ?> --FILE-- diff --git a/ext/oci8/tests/array_bind_date.phpt b/ext/oci8/tests/array_bind_date.phpt index fb9320865cee..2e1aced15237 100644 --- a/ext/oci8/tests/array_bind_date.phpt +++ b/ext/oci8/tests/array_bind_date.phpt @@ -4,9 +4,9 @@ oci_bind_array_by_name() and SQLT_ODT oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- = 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -18,7 +18,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- = 12)) { @@ -17,7 +17,7 @@ NLS_LANG=.AL32UTF8 --FILE-- = 12)) { @@ -17,7 +17,7 @@ NLS_LANG=.AL32UTF8 --FILE-- = 12)) { @@ -17,7 +17,7 @@ NLS_LANG=.AL32UTF8 --FILE-- = 12)) { @@ -19,7 +19,7 @@ NLS_LANG=.AL32UTF8 // Same test as bind_char_3 but the PL/SQL function uses VARCHAR2 instead of CHAR -require(__DIR__.'/connect.inc'); +require __DIR__.'/connect.inc'; // Initialization diff --git a/ext/oci8/tests/bind_empty.phpt b/ext/oci8/tests/bind_empty.phpt index b2f909e0fec3..9a6e39bcf2f4 100644 --- a/ext/oci8/tests/bind_empty.phpt +++ b/ext/oci8/tests/bind_empty.phpt @@ -4,7 +4,7 @@ binding empty values oci8 --SKIPIF-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- --INI-- precision = 14 --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- = 12)) { die("skip works only with Oracle 12c or greater version of Oracle client libraries"); @@ -13,7 +13,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- --FILE-- --FILE-- SQLT_BDOUBLE, diff --git a/ext/oci8/tests/bind_unsupported_3.phpt b/ext/oci8/tests/bind_unsupported_3.phpt index f51be27be7d7..21a181ef48c4 100644 --- a/ext/oci8/tests/bind_unsupported_3.phpt +++ b/ext/oci8/tests/bind_unsupported_3.phpt @@ -4,14 +4,14 @@ Bind with various bind types not supported by TimesTen oci8 --SKIPIF-- false, 'timesten' => true); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- SQLT_CLOB, diff --git a/ext/oci8/tests/bug26133.phpt b/ext/oci8/tests/bug26133.phpt index cc61e3e89f90..ce74a41680b7 100644 --- a/ext/oci8/tests/bug26133.phpt +++ b/ext/oci8/tests/bug26133.phpt @@ -4,12 +4,12 @@ Bug #26133 (ocifreedesc() segfault) oci8 --SKIPIF-- --FILE-- = 12)) { @@ -17,7 +17,7 @@ NLS_LANG= --FILE-- = 12)) { diff --git a/ext/oci8/tests/bug27303_3.phpt b/ext/oci8/tests/bug27303_3.phpt index 0e97c4d78d42..4454c95810a8 100644 --- a/ext/oci8/tests/bug27303_3.phpt +++ b/ext/oci8/tests/bug27303_3.phpt @@ -4,7 +4,7 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) oci8 --SKIPIF-- --FILE-- = 12)) { diff --git a/ext/oci8/tests/bug32325.phpt b/ext/oci8/tests/bug32325.phpt index 021cee18ce91..31f298ef6296 100644 --- a/ext/oci8/tests/bug32325.phpt +++ b/ext/oci8/tests/bug32325.phpt @@ -4,14 +4,14 @@ Bug #32325 (Cannot retrieve collection using OCI8) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (empty($dbase)) die ("skip requires network connection alias for DB link loopback"); if ($test_drcp) die("skip DRCP does not support shared database links"); ?> @@ -15,7 +15,7 @@ oci8.default_prefetch=5 --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --INI-- oci8.statement_cache_size=20 diff --git a/ext/oci8/tests/bug43492.phpt b/ext/oci8/tests/bug43492.phpt index 311a0cab8a75..b411db637430 100644 --- a/ext/oci8/tests/bug43492.phpt +++ b/ext/oci8/tests/bug43492.phpt @@ -4,9 +4,9 @@ Bug #43492 (Nested cursor leaks) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- diff --git a/ext/oci8/tests/bug44008.phpt b/ext/oci8/tests/bug44008.phpt index e8bd9d518944..36ade04951c2 100644 --- a/ext/oci8/tests/bug44008.phpt +++ b/ext/oci8/tests/bug44008.phpt @@ -4,9 +4,9 @@ Bug #44008 (Incorrect usage of OCILob->close crashes PHP) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs: different error handling for this undefined behavior -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; // error3.phpt obsoletes this test for newer Oracle client versions // Assume runtime client version is >= compile time client version preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches); @@ -21,7 +21,7 @@ NLS_LANG=.AL32UTF8 --FILE-- false, 'timesten' => true); // test runs on these DBs: shorter message length in TimesTen -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --ENV-- NLS_LANG=.AL32UTF8 --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --ENV-- NLS_LANG=.AL32UTF8 --FILE-- true, 'timesten' => true); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- true, 'timesten' => true); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => true); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { die("skip needs to be run as a user with access to DBMS_LOCK"); } @@ -20,7 +20,7 @@ if (!(isset($matches[0]) && $matches[0] >= 18)) { --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- diff --git a/ext/oci8/tests/commit_002.phpt b/ext/oci8/tests/commit_002.phpt index fb6d3cf6c4d1..e04b80d08610 100644 --- a/ext/oci8/tests/commit_002.phpt +++ b/ext/oci8/tests/commit_002.phpt @@ -4,14 +4,14 @@ Test oci_commit failure oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- = 11)) { diff --git a/ext/oci8/tests/conn_attr_1.phpt b/ext/oci8/tests/conn_attr_1.phpt index d640db1bfefe..5c7ab61d999e 100644 --- a/ext/oci8/tests/conn_attr_1.phpt +++ b/ext/oci8/tests/conn_attr_1.phpt @@ -5,9 +5,9 @@ oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); @@ -24,7 +24,7 @@ if (!(isset($matches[0]) && $matches[1] >= 10)) { $testuser = 'testuser_attr_1'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(__DIR__."/conn_attr.inc"); +require __DIR__."/conn_attr.inc"; $attr_array = array('MODULE','ACTION','CLIENT_INFO','CLIENT_IDENTIFIER'); diff --git a/ext/oci8/tests/conn_attr_2.phpt b/ext/oci8/tests/conn_attr_2.phpt index 9133621e95ee..dce6270f92cf 100644 --- a/ext/oci8/tests/conn_attr_2.phpt +++ b/ext/oci8/tests/conn_attr_2.phpt @@ -5,9 +5,9 @@ oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip output might vary with DRCP"); @@ -25,7 +25,7 @@ oci8.privileged_connect = On $testuser = 'testuser_attr_2'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(__DIR__."/conn_attr.inc"); +require __DIR__."/conn_attr.inc"; $attr_array = array('MODULE','ACTION','CLIENT_INFO','CLIENT_IDENTIFIER'); diff --git a/ext/oci8/tests/conn_attr_3.phpt b/ext/oci8/tests/conn_attr_3.phpt index e391f2c6d655..c2e62bd3ff13 100644 --- a/ext/oci8/tests/conn_attr_3.phpt +++ b/ext/oci8/tests/conn_attr_3.phpt @@ -5,9 +5,9 @@ oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip output might vary with DRCP"); @@ -23,7 +23,7 @@ if (!(isset($matches[0]) && $matches[1] >= 10)) { $testuser = 'testuser_attr_3'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(__DIR__."/conn_attr.inc"); +require __DIR__."/conn_attr.inc"; echo"**Test Set and get values for the attributes with oci_close() ************\n"; // With oci_connect ,oci_pconnect ,oci_new_connect diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index e01a99bebc41..eccbc78c0e03 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -4,9 +4,9 @@ Set and get of connection attributes with errors. oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); @@ -29,7 +29,7 @@ error_reporting(E_ALL ^ E_DEPRECATED); $testuser = 'testuser_attr_4'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(__DIR__."/conn_attr.inc"); +require __DIR__."/conn_attr.inc"; $attr_array = array('MODULE','ACTION','CLIENT_INFO','CLIENT_IDENTIFIER'); diff --git a/ext/oci8/tests/conn_attr_5.phpt b/ext/oci8/tests/conn_attr_5.phpt index 5b7a348dbef1..6ea0796cd7c5 100644 --- a/ext/oci8/tests/conn_attr_5.phpt +++ b/ext/oci8/tests/conn_attr_5.phpt @@ -5,9 +5,9 @@ oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip output might vary with DRCP"); @@ -23,7 +23,7 @@ if (!(isset($matches[0]) && $matches[1] >= 10)) { $testuser = 'testuser_attr_5'; // Used in conn_attr.inc $testpassword = 'testuser'; -require(__DIR__."/conn_attr.inc"); +require __DIR__."/conn_attr.inc"; echo"**Test - Set and get values for the attributes with scope end ************\n"; diff --git a/ext/oci8/tests/connect.inc b/ext/oci8/tests/connect.inc index 06d134856860..febb49b90a0c 100644 --- a/ext/oci8/tests/connect.inc +++ b/ext/oci8/tests/connect.inc @@ -1,6 +1,6 @@ --FILE-- --FILE-- --FILE-- --FILE-- --INI-- oci8.old_oci_close_semantics=0 --FILE-- --INI-- oci8.old_oci_close_semantics=1 --FILE-- --INI-- oci8.old_oci_close_semantics=0 --FILE-- --INI-- oci8.old_oci_close_semantics=1 --FILE-- --INI-- oci8.old_oci_close_semantics=0 --FILE-- --INI-- oci8.old_oci_close_semantics=1 --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { die("skip needs to be run as a DBA user"); } @@ -22,7 +22,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { die("skip needs to be run as a DBA user"); } @@ -26,7 +26,7 @@ if (!function_exists('oci_set_db_operation')) --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --INI-- oci8.default_prefetch=20 --FILE-- --INI-- oci8.default_prefetch=100 --FILE-- --INI-- oci8.default_prefetch=100 --FILE-- --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- = 12) { --FILE-- --FILE-- --INI-- oci8.old_oci_close_semantics=1 diff --git a/ext/oci8/tests/drcp_conn_close2.phpt b/ext/oci8/tests/drcp_conn_close2.phpt index 3c9cc89f8a4b..289c215dc2db 100644 --- a/ext/oci8/tests/drcp_conn_close2.phpt +++ b/ext/oci8/tests/drcp_conn_close2.phpt @@ -4,7 +4,7 @@ DRCP: oci_connect() with oci_close() and oci8.old_oci_close_semantics OFF oci8 --SKIPIF-- --INI-- oci8.old_oci_close_semantics=0 diff --git a/ext/oci8/tests/drcp_connect1.phpt b/ext/oci8/tests/drcp_connect1.phpt index ea4ec1b9ed1d..3a40da9bf707 100644 --- a/ext/oci8/tests/drcp_connect1.phpt +++ b/ext/oci8/tests/drcp_connect1.phpt @@ -4,9 +4,9 @@ DRCP: oci_connect() oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs (Calling PL/SQL from SQL is not supported in TimesTen) -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --INI-- oci8.connection_class=test diff --git a/ext/oci8/tests/drcp_newconnect.phpt b/ext/oci8/tests/drcp_newconnect.phpt index 04c8bc83fd98..7bdf7d785a95 100644 --- a/ext/oci8/tests/drcp_newconnect.phpt +++ b/ext/oci8/tests/drcp_newconnect.phpt @@ -4,7 +4,7 @@ DRCP: oci_new_connect() oci8 --SKIPIF-- --INI-- oci8.connection_class=test diff --git a/ext/oci8/tests/drcp_pconn_close1.phpt b/ext/oci8/tests/drcp_pconn_close1.phpt index 4d4557b5d5e9..8c81e4646301 100644 --- a/ext/oci8/tests/drcp_pconn_close1.phpt +++ b/ext/oci8/tests/drcp_pconn_close1.phpt @@ -4,7 +4,7 @@ DRCP: oci_pconnect() with oci_close() and oci8.old_oci_close_semantics ON oci8 --SKIPIF-- --INI-- oci8.old_oci_close_semantics=1 diff --git a/ext/oci8/tests/drcp_pconn_close2.phpt b/ext/oci8/tests/drcp_pconn_close2.phpt index a153764f59fb..dcc14c8cc99d 100644 --- a/ext/oci8/tests/drcp_pconn_close2.phpt +++ b/ext/oci8/tests/drcp_pconn_close2.phpt @@ -4,7 +4,7 @@ DRCP: oci_pconnect() with oci_close() and oci8.old_oci_close_semantics OFF oci8 --SKIPIF-- --INI-- oci8.old_oci_close_semantics=0 diff --git a/ext/oci8/tests/drcp_privileged.phpt b/ext/oci8/tests/drcp_privileged.phpt index 77974ff126d0..cb126605466c 100644 --- a/ext/oci8/tests/drcp_privileged.phpt +++ b/ext/oci8/tests/drcp_privileged.phpt @@ -4,8 +4,8 @@ DRCP: privileged connect oci8 --SKIPIF-- --INI-- oci8.old_oci_close_semantics=1 diff --git a/ext/oci8/tests/drcp_scope2.phpt b/ext/oci8/tests/drcp_scope2.phpt index f057e45efed1..8eece242d2fa 100644 --- a/ext/oci8/tests/drcp_scope2.phpt +++ b/ext/oci8/tests/drcp_scope2.phpt @@ -4,7 +4,7 @@ DRCP: oci_new_connect() and oci_connect with scope end when oci8.old_oci_close_s oci8 --SKIPIF-- --INI-- oci8.old_oci_close_semantics=0 diff --git a/ext/oci8/tests/drcp_scope3.phpt b/ext/oci8/tests/drcp_scope3.phpt index 1637d086123b..bf8a2729095a 100644 --- a/ext/oci8/tests/drcp_scope3.phpt +++ b/ext/oci8/tests/drcp_scope3.phpt @@ -4,7 +4,7 @@ DRCP: oci_pconnect() with scope end when oci8.old_oci_close_semantics ON oci8 --SKIPIF-- --INI-- oci8.old_oci_close_semantics=1 diff --git a/ext/oci8/tests/drcp_scope4.phpt b/ext/oci8/tests/drcp_scope4.phpt index f72a64b82aef..15bd778bdf4f 100644 --- a/ext/oci8/tests/drcp_scope4.phpt +++ b/ext/oci8/tests/drcp_scope4.phpt @@ -4,7 +4,7 @@ DRCP: oci_pconnect() with scope end when oci8.old_oci_close_semantics OFF oci8 --SKIPIF-- --INI-- oci8.old_oci_close_semantics=0 diff --git a/ext/oci8/tests/drcp_scope5.phpt b/ext/oci8/tests/drcp_scope5.phpt index 5dd38375207a..733ac8a84756 100644 --- a/ext/oci8/tests/drcp_scope5.phpt +++ b/ext/oci8/tests/drcp_scope5.phpt @@ -4,7 +4,7 @@ DRCP: oci_pconnect() with scope end when oci8.old_oci_close_semantics ON oci8 --SKIPIF-- --INI-- oci8.old_oci_close_semantics=1 diff --git a/ext/oci8/tests/driver_name.phpt b/ext/oci8/tests/driver_name.phpt index 4fbb3a648ed9..0e72c98f8c2b 100644 --- a/ext/oci8/tests/driver_name.phpt +++ b/ext/oci8/tests/driver_name.phpt @@ -4,8 +4,8 @@ Verify that the Driver Name attribute is set oci8 --SKIPIF-- = 2) || ($matches ?> --FILE-- = 2) || ($matches ?> --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; // Assume runtime client version is >= compile time client version $cv = explode('.', oci_client_version()); if ($cv[0] < 11 || ($cv[0] == 11 && $cv[1] < 2) || ($cv[0] == 11 && $cv[1] == 2 && $cv[3] < 3)) { @@ -16,7 +16,7 @@ if ($cv[0] < 11 || ($cv[0] == 11 && $cv[1] < 2) || ($cv[0] == 11 && $cv[1] == 2 --FILE-- --FILE-- true, 'timesten' => true); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => true); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -21,7 +21,7 @@ oci8.statement_cache_size = 0 --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); if (!(isset($matches[0]) && $matches[1] >= 12)) { die("skip expected output only valid when using Oracle Database 12c or greater"); @@ -19,7 +19,7 @@ if (!(isset($matches[0]) && $matches[0] >= 12)) { --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ob_start(); phpinfo(INFO_MODULES); $phpinfo = ob_get_clean(); @@ -19,7 +19,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') die("skip Test script not ported to Windows") --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- read(), LOB->seek() and LOB->tell() with nul bytes in data oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- write() for multiple inserts oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- getMessage(), "\n"; } -require(__DIR__.'/drop_table.inc'); +require __DIR__.'/drop_table.inc'; echo "Done\n"; diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt index 6046c4630160..e138b5c1c025 100644 --- a/ext/oci8/tests/lob_043.phpt +++ b/ext/oci8/tests/lob_043.phpt @@ -4,15 +4,15 @@ Bug #49560 (LOB resource destructor and refcount test) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --INI-- oci8.prefetch_lob_size=100000 diff --git a/ext/oci8/tests/lob_temp.phpt b/ext/oci8/tests/lob_temp.phpt index e3c1c991a897..be46cda6fbec 100644 --- a/ext/oci8/tests/lob_temp.phpt +++ b/ext/oci8/tests/lob_temp.phpt @@ -4,9 +4,9 @@ temporary lobs oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- @@ -16,7 +16,7 @@ display_errors = On // See http://news.php.net/php.internals/50202 // http://svn.php.net/viewvc?view=revision&revision=311870 -require(__DIR__.'/connect.inc'); +require __DIR__.'/connect.inc'; // Run Test diff --git a/ext/oci8/tests/null_byte_2.phpt b/ext/oci8/tests/null_byte_2.phpt index f8bd4a02f54c..6f7b6b2c53fd 100644 --- a/ext/oci8/tests/null_byte_2.phpt +++ b/ext/oci8/tests/null_byte_2.phpt @@ -4,9 +4,9 @@ Null bytes in SQL statements oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --INI-- display_errors = On @@ -14,7 +14,7 @@ error_reporting = E_WARNING --FILE-- --INI-- display_errors = On @@ -12,7 +12,7 @@ error_reporting = E_WARNING --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --INI-- oci8.old_oci_close_semantics=1 diff --git a/ext/oci8/tests/old_oci_close1.phpt b/ext/oci8/tests/old_oci_close1.phpt index 88e34903ab37..dab2380ea7dd 100644 --- a/ext/oci8/tests/old_oci_close1.phpt +++ b/ext/oci8/tests/old_oci_close1.phpt @@ -4,7 +4,7 @@ oci8.old_oci_close_semantics Off oci8 --SKIPIF-- --INI-- oci8.old_oci_close_semantics=0 diff --git a/ext/oci8/tests/password.phpt b/ext/oci8/tests/password.phpt index c99a999597d8..322a4d7e47ab 100644 --- a/ext/oci8/tests/password.phpt +++ b/ext/oci8/tests/password.phpt @@ -4,7 +4,7 @@ oci_password_change() for non-persistent connections oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); -require(__DIR__.'/connect.inc'); +require __DIR__.'/skipif.inc'; +require __DIR__.'/connect.inc'; if (empty($dbase)) die ("skip requires database connection string be set"); if ($test_drcp) die("skip password change not supported in DRCP Mode"); diff --git a/ext/oci8/tests/pecl_bug10194.phpt b/ext/oci8/tests/pecl_bug10194.phpt index 8fc08d7898bc..5abe77da8d9f 100644 --- a/ext/oci8/tests/pecl_bug10194.phpt +++ b/ext/oci8/tests/pecl_bug10194.phpt @@ -4,9 +4,9 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (getenv("USE_ZEND_ALLOC") === "0") { die("skip Zend MM disabled"); diff --git a/ext/oci8/tests/pecl_bug10194_blob.phpt b/ext/oci8/tests/pecl_bug10194_blob.phpt index 1cd483f665f8..a6a08764f6aa 100644 --- a/ext/oci8/tests/pecl_bug10194_blob.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob.phpt @@ -4,9 +4,9 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/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") { @@ -20,8 +20,8 @@ memory_limit=3M // This test is dependent on the behavior of the memory manager -require(__DIR__.'/connect.inc'); -require(__DIR__.'/create_table.inc'); +require __DIR__.'/connect.inc'; +require __DIR__.'/create_table.inc'; $ora_sql = "INSERT INTO ".$schema.$table_name." (blob) VALUES (empty_blob())"; diff --git a/ext/oci8/tests/pecl_bug10194_blob_64.phpt b/ext/oci8/tests/pecl_bug10194_blob_64.phpt index 0fa46b152dd3..8893570e20dc 100644 --- a/ext/oci8/tests/pecl_bug10194_blob_64.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob_64.phpt @@ -4,9 +4,9 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside oci8 --SKIPIF-- true, 'timesten' => false); // test runs on thes -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); if (getenv("USE_ZEND_ALLOC") === "0") { diff --git a/ext/oci8/tests/pecl_bug16842.phpt b/ext/oci8/tests/pecl_bug16842.phpt index 1ece0095c2f7..1af369547ebc 100644 --- a/ext/oci8/tests/pecl_bug16842.phpt +++ b/ext/oci8/tests/pecl_bug16842.phpt @@ -4,16 +4,16 @@ PECL Bug #16842 (NO_DATA_FOUND exception is a warning) oci8 --SKIPIF-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --INI-- error_reporting = E_WARNING --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- --INI-- diff --git a/ext/oci8/tests/refcur_prefetch_1.phpt b/ext/oci8/tests/refcur_prefetch_1.phpt index 0c0d6747c42e..787849a5ee66 100644 --- a/ext/oci8/tests/refcur_prefetch_1.phpt +++ b/ext/oci8/tests/refcur_prefetch_1.phpt @@ -4,8 +4,8 @@ Prefetch with REF cursor. Test different values for prefetch with oci_set_prefet oci8 --SKIPIF-- = 10))) { @@ -21,7 +21,7 @@ if (!(isset($matches[0]) && ?> --FILE-- = 10))) { diff --git a/ext/oci8/tests/refcur_prefetch_3.phpt b/ext/oci8/tests/refcur_prefetch_3.phpt index 8e9822920322..007cf843b13f 100644 --- a/ext/oci8/tests/refcur_prefetch_3.phpt +++ b/ext/oci8/tests/refcur_prefetch_3.phpt @@ -6,8 +6,8 @@ oci8.default_prefetch=5 oci8 --SKIPIF-- = 2) || diff --git a/ext/oci8/tests/refcur_prefetch_4.phpt b/ext/oci8/tests/refcur_prefetch_4.phpt index 94d4a517b895..9c481360d0bd 100644 --- a/ext/oci8/tests/refcur_prefetch_4.phpt +++ b/ext/oci8/tests/refcur_prefetch_4.phpt @@ -4,8 +4,8 @@ Prefetch with REF cursor. Test No 4 oci8 --SKIPIF-- = 10))) { diff --git a/ext/oci8/tests/select_null.phpt b/ext/oci8/tests/select_null.phpt index 652f682e6c40..d12acf829064 100644 --- a/ext/oci8/tests/select_null.phpt +++ b/ext/oci8/tests/select_null.phpt @@ -4,7 +4,7 @@ SELECTing NULL values oci8 --SKIPIF-- --FILE-- --FILE-- true, 'timesten' => true); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- --FILE-- --INI-- oci8.ping_interval=0 --FILE-- --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- true, 'timesten' => false); // test runs on these DBs -require(__DIR__.'/skipif.inc'); +require __DIR__.'/skipif.inc'; ?> --FILE-- Date: Mon, 31 Jul 2023 23:26:49 +0100 Subject: [PATCH 037/120] Convert CRLF to LF --- .../gracefull_fail_on_empty_result_set.phpt | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt b/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt index d915f67949c2..6902e0f37847 100644 --- a/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt +++ b/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt @@ -1,57 +1,57 @@ ---TEST-- -Fail gracefully on empty result set +--TEST-- +Fail gracefully on empty result set --EXTENSIONS-- mysqli --SKIPIF-- - ---FILE-- -multi_query("SELECT 1"); - var_dump($link->next_result()); // should return false - var_dump($link->store_result()); // now what happens here!? - - - // Returns only one result set - $link->multi_query("SELECT 1"); - var_dump($link->next_result()); - var_dump($link->use_result()); - - $link->close(); -?> ---CLEAN-- - ---EXPECT-- -bool(false) -object(mysqli_result)#3 (5) { - ["current_field"]=> - int(0) - ["field_count"]=> - int(1) - ["lengths"]=> - NULL - ["num_rows"]=> - int(1) - ["type"]=> - int(0) -} -bool(false) -object(mysqli_result)#3 (5) { - ["current_field"]=> - int(0) - ["field_count"]=> - int(1) - ["lengths"]=> - NULL - ["num_rows"]=> - int(0) - ["type"]=> - int(1) -} +--FILE-- +multi_query("SELECT 1"); + var_dump($link->next_result()); // should return false + var_dump($link->store_result()); // now what happens here!? + + + // Returns only one result set + $link->multi_query("SELECT 1"); + var_dump($link->next_result()); + var_dump($link->use_result()); + + $link->close(); +?> +--CLEAN-- + +--EXPECT-- +bool(false) +object(mysqli_result)#3 (5) { + ["current_field"]=> + int(0) + ["field_count"]=> + int(1) + ["lengths"]=> + NULL + ["num_rows"]=> + int(1) + ["type"]=> + int(0) +} +bool(false) +object(mysqli_result)#3 (5) { + ["current_field"]=> + int(0) + ["field_count"]=> + int(1) + ["lengths"]=> + NULL + ["num_rows"]=> + int(0) + ["type"]=> + int(1) +} From a21edc52aa5717f6ac905eeecdf21b001bb02340 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Mon, 31 Jul 2023 23:41:10 +0100 Subject: [PATCH 038/120] Remove unnecessary parentheses around language constructs in mysqli --- ext/mysqli/tests/001.phpt | 4 +- ext/mysqli/tests/002.phpt | 6 +- ext/mysqli/tests/003.phpt | 6 +- ext/mysqli/tests/004.phpt | 6 +- ext/mysqli/tests/005.phpt | 6 +- ext/mysqli/tests/006.phpt | 6 +- ext/mysqli/tests/007.phpt | 6 +- ext/mysqli/tests/008.phpt | 6 +- ext/mysqli/tests/009.phpt | 6 +- ext/mysqli/tests/010.phpt | 6 +- ext/mysqli/tests/011.phpt | 6 +- ext/mysqli/tests/012.phpt | 6 +- ext/mysqli/tests/013.phpt | 6 +- ext/mysqli/tests/014.phpt | 6 +- ext/mysqli/tests/015.phpt | 6 +- ext/mysqli/tests/016.phpt | 4 +- ext/mysqli/tests/017.phpt | 4 +- ext/mysqli/tests/018.phpt | 4 +- ext/mysqli/tests/019.phpt | 6 +- ext/mysqli/tests/020.phpt | 6 +- ext/mysqli/tests/021.phpt | 6 +- ext/mysqli/tests/022.phpt | 6 +- ext/mysqli/tests/023.phpt | 6 +- ext/mysqli/tests/024.phpt | 6 +- ext/mysqli/tests/025.phpt | 6 +- ext/mysqli/tests/026.phpt | 6 +- ext/mysqli/tests/027.phpt | 4 +- ext/mysqli/tests/028.phpt | 4 +- ext/mysqli/tests/029.phpt | 6 +- ext/mysqli/tests/030.phpt | 4 +- ext/mysqli/tests/031.phpt | 4 +- ext/mysqli/tests/032.phpt | 6 +- ext/mysqli/tests/033.phpt | 4 +- ext/mysqli/tests/034.phpt | 4 +- ext/mysqli/tests/035.phpt | 4 +- ext/mysqli/tests/036.phpt | 6 +- ext/mysqli/tests/037.phpt | 6 +- ext/mysqli/tests/038.phpt | 6 +- ext/mysqli/tests/039.phpt | 4 +- ext/mysqli/tests/040.phpt | 6 +- ext/mysqli/tests/041.phpt | 6 +- ext/mysqli/tests/042.phpt | 6 +- ext/mysqli/tests/043.phpt | 6 +- ext/mysqli/tests/044.phpt | 4 +- ext/mysqli/tests/045.phpt | 2 +- ext/mysqli/tests/046.phpt | 6 +- ext/mysqli/tests/047.phpt | 6 +- ext/mysqli/tests/048.phpt | 6 +- ext/mysqli/tests/049.phpt | 4 +- ext/mysqli/tests/050.phpt | 4 +- ext/mysqli/tests/051.phpt | 4 +- ext/mysqli/tests/052.phpt | 4 +- ext/mysqli/tests/053.phpt | 4 +- ext/mysqli/tests/054.phpt | 4 +- ext/mysqli/tests/055.phpt | 4 +- ext/mysqli/tests/056.phpt | 4 +- ext/mysqli/tests/057.phpt | 6 +- ext/mysqli/tests/058.phpt | 6 +- ext/mysqli/tests/059.phpt | 6 +- ext/mysqli/tests/060.phpt | 6 +- ext/mysqli/tests/062.phpt | 4 +- ext/mysqli/tests/063.phpt | 4 +- ext/mysqli/tests/064.phpt | 4 +- ext/mysqli/tests/065.phpt | 4 +- ext/mysqli/tests/066.phpt | 6 +- ext/mysqli/tests/067.phpt | 6 +- ext/mysqli/tests/069.phpt | 4 +- ext/mysqli/tests/070.phpt | 4 +- ext/mysqli/tests/071.phpt | 4 +- ext/mysqli/tests/072.phpt | 4 +- ext/mysqli/tests/074.phpt | 4 +- ext/mysqli/tests/bug28817.phpt | 4 +- ext/mysqli/tests/bug29311.phpt | 4 +- ext/mysqli/tests/bug30967.phpt | 4 +- ext/mysqli/tests/bug31668.phpt | 4 +- ext/mysqli/tests/bug32405.phpt | 6 +- ext/mysqli/tests/bug33090.phpt | 4 +- ext/mysqli/tests/bug33263.phpt | 4 +- ext/mysqli/tests/bug33491.phpt | 4 +- ext/mysqli/tests/bug34785.phpt | 4 +- ext/mysqli/tests/bug34810.phpt | 6 +- ext/mysqli/tests/bug35103.phpt | 6 +- ext/mysqli/tests/bug35517.phpt | 6 +- ext/mysqli/tests/bug35759.phpt | 6 +- ext/mysqli/tests/bug36420.phpt | 4 +- ext/mysqli/tests/bug36745.phpt | 6 +- ext/mysqli/tests/bug36802.phpt | 2 +- ext/mysqli/tests/bug36949.phpt | 6 +- ext/mysqli/tests/bug37090.phpt | 4 +- ext/mysqli/tests/bug38710.phpt | 4 +- ext/mysqli/tests/bug39457.phpt | 4 +- ext/mysqli/tests/bug42378.phpt | 6 +- ext/mysqli/tests/bug42548.phpt | 2 +- ext/mysqli/tests/bug44897.phpt | 4 +- ext/mysqli/tests/bug45019.phpt | 6 +- ext/mysqli/tests/bug45289.phpt | 6 +- ext/mysqli/tests/bug46109.phpt | 4 +- ext/mysqli/tests/bug46614.phpt | 4 +- ext/mysqli/tests/bug47050.phpt | 4 +- ext/mysqli/tests/bug48909.phpt | 6 +- ext/mysqli/tests/bug49027.phpt | 6 +- ext/mysqli/tests/bug49442.phpt | 6 +- ext/mysqli/tests/bug50772.phpt | 4 +- ext/mysqli/tests/bug51605.phpt | 4 +- ext/mysqli/tests/bug51647.phpt | 4 +- ext/mysqli/tests/bug52082.phpt | 4 +- ext/mysqli/tests/bug52891.phpt | 6 +- ext/mysqli/tests/bug53503.phpt | 2 +- ext/mysqli/tests/bug54221.phpt | 4 +- ext/mysqli/tests/bug54674.phpt | 4 +- ext/mysqli/tests/bug55283.phpt | 4 +- ext/mysqli/tests/bug55582.phpt | 2 +- ext/mysqli/tests/bug55653.phpt | 4 +- ext/mysqli/tests/bug62046.phpt | 4 +- ext/mysqli/tests/bug62885.phpt | 2 +- ext/mysqli/tests/bug63398.phpt | 2 +- ext/mysqli/tests/bug64726.phpt | 2 +- ext/mysqli/tests/bug66043.phpt | 4 +- ext/mysqli/tests/bug66124.phpt | 4 +- ext/mysqli/tests/bug66762.phpt | 4 +- ext/mysqli/tests/bug67839.phpt | 6 +- ext/mysqli/tests/bug67983.phpt | 4 +- ext/mysqli/tests/bug68077.phpt | 4 +- ext/mysqli/tests/bug70384.phpt | 2 +- ext/mysqli/tests/bug70949.phpt | 4 +- ext/mysqli/tests/bug71863.phpt | 4 +- ext/mysqli/tests/bug72489.phpt | 6 +- ext/mysqli/tests/bug72701.phpt | 2 +- ext/mysqli/tests/bug73462.phpt | 4 +- ext/mysqli/tests/bug73800.phpt | 4 +- ext/mysqli/tests/bug73949.phpt | 4 +- ext/mysqli/tests/bug74021.phpt | 4 +- ext/mysqli/tests/bug74547.phpt | 4 +- ext/mysqli/tests/bug74779.phpt | 4 +- ext/mysqli/tests/bug74968.phpt | 4 +- ext/mysqli/tests/bug75018.phpt | 6 +- ext/mysqli/tests/bug75448.phpt | 2 +- ext/mysqli/tests/bug76386.phpt | 6 +- ext/mysqli/tests/bug77597.phpt | 6 +- ext/mysqli/tests/bug77935.phpt | 4 +- ext/mysqli/tests/bug77956.phpt | 4 +- ext/mysqli/tests/bug79084.phpt | 4 +- ext/mysqli/tests/bug79084_collision.phpt | 4 +- ext/mysqli/tests/bug79375.phpt | 6 +- ext/mysqli/tests/bug80837.phpt | 4 +- ext/mysqli/tests/bug_bits.phpt | 6 +- ext/mysqli/tests/bug_mysql_49406.phpt | 4 +- ext/mysqli/tests/gh7837.phpt | 4 +- ext/mysqli/tests/gh7932.phpt | 2 +- ext/mysqli/tests/gh8058.phpt | 2 +- ext/mysqli/tests/gh8068.phpt | 2 +- ext/mysqli/tests/gh8267.phpt | 4 +- ext/mysqli/tests/gh9590.phpt | 4 +- .../gracefull_fail_on_empty_result_set.phpt | 114 +++++++++--------- ext/mysqli/tests/mysqli_affected_rows.phpt | 6 +- ext/mysqli/tests/mysqli_affected_rows_oo.phpt | 6 +- ...file_overrides_local_infile_directory.phpt | 4 +- ext/mysqli/tests/mysqli_auth_pam.phpt | 8 +- ext/mysqli/tests/mysqli_autocommit.phpt | 4 +- ext/mysqli/tests/mysqli_autocommit_oo.phpt | 4 +- .../tests/mysqli_begin_transaction.phpt | 8 +- ext/mysqli/tests/mysqli_change_user.phpt | 4 +- .../tests/mysqli_change_user_get_lock.phpt | 8 +- .../tests/mysqli_change_user_insert_id.phpt | 2 +- .../mysqli_change_user_locks_temporary.phpt | 8 +- ext/mysqli/tests/mysqli_change_user_old.phpt | 4 +- ext/mysqli/tests/mysqli_change_user_oo.phpt | 2 +- ...ysqli_change_user_prepared_statements.phpt | 4 +- .../tests/mysqli_change_user_rollback.phpt | 2 +- ext/mysqli/tests/mysqli_character_set.phpt | 6 +- .../tests/mysqli_character_set_name.phpt | 4 +- .../tests/mysqli_character_set_name_oo.phpt | 4 +- .../tests/mysqli_class_mysqli_interface.phpt | 4 +- ...ysqli_class_mysqli_properties_no_conn.phpt | 6 +- .../mysqli_class_mysqli_result_interface.phpt | 6 +- .../mysqli_class_mysqli_stmt_interface.phpt | 6 +- ext/mysqli/tests/mysqli_close.phpt | 4 +- ext/mysqli/tests/mysqli_close_oo.phpt | 4 +- ext/mysqli/tests/mysqli_commit.phpt | 4 +- ext/mysqli/tests/mysqli_commit_oo.phpt | 2 +- ext/mysqli/tests/mysqli_connect.phpt | 4 +- ext/mysqli/tests/mysqli_connect_errno.phpt | 4 +- ext/mysqli/tests/mysqli_connect_error.phpt | 4 +- ext/mysqli/tests/mysqli_connect_oo.phpt | 4 +- .../tests/mysqli_connect_oo_defaults.phpt | 4 +- ext/mysqli/tests/mysqli_connect_twice.phpt | 4 +- ext/mysqli/tests/mysqli_data_seek.phpt | 8 +- ext/mysqli/tests/mysqli_data_seek_oo.phpt | 8 +- ext/mysqli/tests/mysqli_debug.phpt | 8 +- ext/mysqli/tests/mysqli_debug_append.phpt | 8 +- .../tests/mysqli_debug_control_string.phpt | 6 +- ext/mysqli/tests/mysqli_debug_ini.phpt | 2 +- .../mysqli_debug_mysqlnd_control_string.phpt | 8 +- .../tests/mysqli_debug_mysqlnd_only.phpt | 2 +- ext/mysqli/tests/mysqli_driver.phpt | 4 +- ext/mysqli/tests/mysqli_dump_debug_info.phpt | 4 +- .../tests/mysqli_dump_debug_info_oo.phpt | 4 +- ext/mysqli/tests/mysqli_errno.phpt | 4 +- ext/mysqli/tests/mysqli_errno_oo.phpt | 4 +- ext/mysqli/tests/mysqli_error.phpt | 4 +- ext/mysqli/tests/mysqli_error_oo.phpt | 4 +- ext/mysqli/tests/mysqli_error_unicode.phpt | 4 +- ext/mysqli/tests/mysqli_execute_query.phpt | 2 +- ext/mysqli/tests/mysqli_expire_password.phpt | 8 +- ext/mysqli/tests/mysqli_explain_metadata.phpt | 2 +- ext/mysqli/tests/mysqli_fetch_all.phpt | 8 +- ext/mysqli/tests/mysqli_fetch_all_oo.phpt | 8 +- ext/mysqli/tests/mysqli_fetch_array.phpt | 6 +- .../tests/mysqli_fetch_array_assoc.phpt | 6 +- .../tests/mysqli_fetch_array_large.phpt | 6 +- .../tests/mysqli_fetch_array_many_rows.phpt | 6 +- ext/mysqli/tests/mysqli_fetch_array_oo.phpt | 8 +- ext/mysqli/tests/mysqli_fetch_assoc.phpt | 8 +- ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt | 2 +- .../tests/mysqli_fetch_assoc_no_alias.phpt | 4 +- .../mysqli_fetch_assoc_no_alias_utf8.phpt | 4 +- ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt | 8 +- .../tests/mysqli_fetch_assoc_zerofill.phpt | 8 +- ext/mysqli/tests/mysqli_fetch_column.phpt | 4 +- ext/mysqli/tests/mysqli_fetch_field.phpt | 8 +- .../tests/mysqli_fetch_field_direct.phpt | 8 +- .../tests/mysqli_fetch_field_direct_oo.phpt | 8 +- .../tests/mysqli_fetch_field_flags.phpt | 4 +- ext/mysqli/tests/mysqli_fetch_field_oo.phpt | 8 +- .../tests/mysqli_fetch_field_types.phpt | 6 +- ext/mysqli/tests/mysqli_fetch_fields.phpt | 8 +- ext/mysqli/tests/mysqli_fetch_lengths.phpt | 8 +- ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt | 10 +- ext/mysqli/tests/mysqli_fetch_object.phpt | 8 +- .../mysqli_fetch_object_no_constructor.phpt | 8 +- .../tests/mysqli_fetch_object_no_object.phpt | 6 +- ext/mysqli/tests/mysqli_fetch_object_oo.phpt | 8 +- ext/mysqli/tests/mysqli_fetch_row.phpt | 8 +- ext/mysqli/tests/mysqli_field_count.phpt | 8 +- ext/mysqli/tests/mysqli_field_seek.phpt | 8 +- ext/mysqli/tests/mysqli_field_tell.phpt | 8 +- ext/mysqli/tests/mysqli_fork.phpt | 4 +- ext/mysqli/tests/mysqli_free_result.phpt | 8 +- ext/mysqli/tests/mysqli_get_charset.phpt | 8 +- ext/mysqli/tests/mysqli_get_client_stats.phpt | 8 +- ...mysqli_get_client_stats_implicit_free.phpt | 8 +- .../tests/mysqli_get_client_stats_off.phpt | 8 +- .../tests/mysqli_get_client_stats_ps.phpt | 8 +- .../mysqli_get_client_stats_skipped.phpt | 6 +- .../tests/mysqli_get_connection_stats.phpt | 8 +- .../mysqli_get_connection_stats_off.phpt | 4 +- ext/mysqli/tests/mysqli_get_host_info.phpt | 8 +- ext/mysqli/tests/mysqli_get_proto_info.phpt | 6 +- ext/mysqli/tests/mysqli_get_server_info.phpt | 8 +- .../tests/mysqli_get_server_version.phpt | 6 +- ext/mysqli/tests/mysqli_get_warnings.phpt | 4 +- ext/mysqli/tests/mysqli_info.phpt | 8 +- ext/mysqli/tests/mysqli_init.phpt | 2 +- ext/mysqli/tests/mysqli_insert_id.phpt | 8 +- .../tests/mysqli_insert_id_variation.phpt | 6 +- .../tests/mysqli_insert_packet_overflow.phpt | 4 +- ext/mysqli/tests/mysqli_kill.phpt | 8 +- ext/mysqli/tests/mysqli_last_insert_id.phpt | 6 +- .../mysqli_local_infile_default_off.phpt | 4 +- ..._local_infile_directory_access_denied.phpt | 2 +- ...ocal_infile_directory_vs_open_basedir.phpt | 4 +- .../tests/mysqli_local_infile_set_on.phpt | 4 +- ext/mysqli/tests/mysqli_max_links.phpt | 8 +- ext/mysqli/tests/mysqli_more_results.phpt | 8 +- ext/mysqli/tests/mysqli_multi_query.phpt | 8 +- .../tests/mysqli_mysqlnd_read_timeout.phpt | 2 +- .../mysqli_mysqlnd_read_timeout_long.phpt | 4 +- .../mysqli_mysqlnd_read_timeout_zero.phpt | 4 +- ext/mysqli/tests/mysqli_next_result.phpt | 8 +- .../tests/mysqli_next_result_error.phpt | 2 +- ext/mysqli/tests/mysqli_no_reconnect.phpt | 6 +- ext/mysqli/tests/mysqli_num_fields.phpt | 8 +- ext/mysqli/tests/mysqli_num_rows.phpt | 8 +- ext/mysqli/tests/mysqli_open_bug74432.phpt | 4 +- ext/mysqli/tests/mysqli_options.phpt | 2 +- .../tests/mysqli_options_init_command.phpt | 6 +- .../mysqli_options_int_and_float_native.phpt | 4 +- .../tests/mysqli_options_openbasedir.phpt | 4 +- ext/mysqli/tests/mysqli_pam_sha256.phpt | 4 +- .../mysqli_pam_sha256_public_key_ini.phpt | 4 +- .../mysqli_pam_sha256_public_key_option.phpt | 4 +- ..._pam_sha256_public_key_option_invalid.phpt | 4 +- .../tests/mysqli_pconn_conn_multiple.phpt | 4 +- ext/mysqli/tests/mysqli_pconn_disabled.phpt | 4 +- ext/mysqli/tests/mysqli_pconn_kill.phpt | 4 +- ext/mysqli/tests/mysqli_pconn_limits.phpt | 4 +- ext/mysqli/tests/mysqli_pconn_max_links.phpt | 10 +- ext/mysqli/tests/mysqli_pconn_reuse.phpt | 4 +- ext/mysqli/tests/mysqli_pconn_twice.phpt | 4 +- ext/mysqli/tests/mysqli_pconnect.phpt | 4 +- ext/mysqli/tests/mysqli_phpinfo.phpt | 4 +- ext/mysqli/tests/mysqli_ping.phpt | 6 +- ext/mysqli/tests/mysqli_poll.phpt | 2 +- ext/mysqli/tests/mysqli_poll_kill.phpt | 2 +- .../mysqli_poll_mixing_insert_select.phpt | 4 +- ext/mysqli/tests/mysqli_prepare.phpt | 8 +- .../tests/mysqli_prepare_no_object.phpt | 6 +- ext/mysqli/tests/mysqli_ps_select_union.phpt | 6 +- ext/mysqli/tests/mysqli_query.phpt | 8 +- ext/mysqli/tests/mysqli_query_iterators.phpt | 8 +- .../tests/mysqli_query_stored_proc.phpt | 2 +- ext/mysqli/tests/mysqli_real_connect.phpt | 6 +- ...mysqli_real_connect_compression_error.phpt | 6 +- .../tests/mysqli_real_connect_pconn.phpt | 4 +- .../tests/mysqli_real_escape_string.phpt | 6 +- .../tests/mysqli_real_escape_string_big5.phpt | 8 +- .../mysqli_real_escape_string_eucjpms.phpt | 8 +- .../mysqli_real_escape_string_euckr.phpt | 8 +- .../mysqli_real_escape_string_gb2312.phpt | 8 +- .../tests/mysqli_real_escape_string_gbk.phpt | 8 +- ...mysqli_real_escape_string_nobackslash.phpt | 6 +- .../tests/mysqli_real_escape_string_sjis.phpt | 8 +- .../mysqli_real_escape_string_unicode.phpt | 8 +- ext/mysqli/tests/mysqli_real_query.phpt | 8 +- ext/mysqli/tests/mysqli_reap_async_query.phpt | 2 +- .../tests/mysqli_reap_async_query_error.phpt | 2 +- .../tests/mysqli_release_savepoint.phpt | 4 +- ext/mysqli/tests/mysqli_report.phpt | 2 +- ext/mysqli/tests/mysqli_report_new.phpt | 2 +- ext/mysqli/tests/mysqli_report_wo_ps.phpt | 4 +- .../tests/mysqli_result_invalid_mode.phpt | 8 +- .../tests/mysqli_result_references.phpt | 8 +- .../mysqli_result_references_mysqlnd.phpt | 2 +- .../tests/mysqli_result_unclonable.phpt | 4 +- ext/mysqli/tests/mysqli_rollback.phpt | 4 +- ext/mysqli/tests/mysqli_savepoint.phpt | 4 +- ext/mysqli/tests/mysqli_select_db.phpt | 8 +- ext/mysqli/tests/mysqli_set_charset.phpt | 2 +- ext/mysqli/tests/mysqli_set_opt.phpt | 4 +- ext/mysqli/tests/mysqli_sqlstate.phpt | 8 +- ext/mysqli/tests/mysqli_ssl_set.phpt | 2 +- ext/mysqli/tests/mysqli_stat.phpt | 6 +- .../tests/mysqli_stmt_affected_rows.phpt | 6 +- ext/mysqli/tests/mysqli_stmt_attr_get.phpt | 8 +- .../tests/mysqli_stmt_attr_get_prefetch.phpt | 6 +- ext/mysqli/tests/mysqli_stmt_attr_set.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_big_prepare.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_bind_limits.phpt | 6 +- ext/mysqli/tests/mysqli_stmt_bind_param.phpt | 10 +- ...mysqli_stmt_bind_param_call_user_func.phpt | 8 +- ...stmt_bind_param_check_param_no_change.phpt | 12 +- .../mysqli_stmt_bind_param_many_columns.phpt | 6 +- .../mysqli_stmt_bind_param_references.phpt | 6 +- .../mysqli_stmt_bind_param_type_juggling.phpt | 6 +- ext/mysqli/tests/mysqli_stmt_bind_result.phpt | 8 +- .../tests/mysqli_stmt_bind_result_bit.phpt | 6 +- .../tests/mysqli_stmt_bind_result_format.phpt | 8 +- .../mysqli_stmt_bind_result_references.phpt | 6 +- .../mysqli_stmt_bind_result_zerofill.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_close.phpt | 10 +- ext/mysqli/tests/mysqli_stmt_data_seek.phpt | 8 +- .../tests/mysqli_stmt_datatype_change.phpt | 6 +- ext/mysqli/tests/mysqli_stmt_errno.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_error.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_execute.phpt | 4 +- .../tests/mysqli_stmt_execute_bind.phpt | 4 +- .../mysqli_stmt_execute_stored_proc.phpt | 2 +- ..._stmt_execute_stored_proc_next_result.phpt | 2 +- .../mysqli_stmt_execute_stored_proc_out.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_fetch.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt | 2 +- ...ysqli_stmt_fetch_fields_win32_unicode.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt | 6 +- ext/mysqli/tests/mysqli_stmt_field_count.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_free_result.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_get_result.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_get_result2.phpt | 8 +- .../tests/mysqli_stmt_get_result_bit.phpt | 2 +- .../mysqli_stmt_get_result_field_count.phpt | 6 +- .../tests/mysqli_stmt_get_result_geom.phpt | 6 +- .../mysqli_stmt_get_result_metadata.phpt | 6 +- ..._stmt_get_result_metadata_fetch_field.phpt | 6 +- .../mysqli_stmt_get_result_non_select.phpt | 6 +- .../tests/mysqli_stmt_get_result_seek.phpt | 6 +- .../tests/mysqli_stmt_get_result_types.phpt | 6 +- .../tests/mysqli_stmt_get_warnings.phpt | 4 +- ext/mysqli/tests/mysqli_stmt_init.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_insert_id.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_multires.phpt | 2 +- ext/mysqli/tests/mysqli_stmt_num_rows.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_param_count.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_prepare.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_reset.phpt | 8 +- .../tests/mysqli_stmt_result_metadata.phpt | 8 +- .../mysqli_stmt_result_metadata_sqltests.phpt | 6 +- .../tests/mysqli_stmt_send_long_data.phpt | 8 +- ...mt_send_long_data_packet_size_mysqlnd.phpt | 6 +- ext/mysqli/tests/mysqli_stmt_sqlstate.phpt | 8 +- .../tests/mysqli_stmt_store_result.phpt | 8 +- ext/mysqli/tests/mysqli_stmt_unclonable.phpt | 4 +- ext/mysqli/tests/mysqli_store_result.phpt | 8 +- .../tests/mysqli_store_result_buffered_c.phpt | 8 +- .../tests/mysqli_store_result_copy.phpt | 8 +- ext/mysqli/tests/mysqli_thread_id.phpt | 8 +- ext/mysqli/tests/mysqli_unclonable.phpt | 4 +- ext/mysqli/tests/mysqli_use_result.phpt | 8 +- ext/mysqli/tests/mysqli_warning_count.phpt | 8 +- .../tests/mysqli_warning_unclonable.phpt | 4 +- .../tests/ps_cursor_multiple_result_sets.phpt | 4 +- 399 files changed, 1121 insertions(+), 1121 deletions(-) diff --git a/ext/mysqli/tests/001.phpt b/ext/mysqli/tests/001.phpt index b3c93a5c1f14..ec4cbc2c2d23 100644 --- a/ext/mysqli/tests/001.phpt +++ b/ext/mysqli/tests/001.phpt @@ -4,11 +4,11 @@ mysqli connect mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --EXPECT-- Num_of_rows=1 diff --git a/ext/mysqli/tests/015.phpt b/ext/mysqli/tests/015.phpt index 9726afe78023..5fef3f9250b9 100644 --- a/ext/mysqli/tests/015.phpt +++ b/ext/mysqli/tests/015.phpt @@ -4,7 +4,7 @@ mysqli autocommit/commit/rollback with innodb mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- array(2) { diff --git a/ext/mysqli/tests/016.phpt b/ext/mysqli/tests/016.phpt index 6d62b566a159..65414c34781e 100644 --- a/ext/mysqli/tests/016.phpt +++ b/ext/mysqli/tests/016.phpt @@ -4,11 +4,11 @@ mysqli fetch user variable mysqli --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --FILE-- --FILE-- --CLEAN-- --FILE-- --FILE-- --FILE-- --CLEAN-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --FILE-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- --CLEAN-- --FILE-- multi_query('SELECT 1;SELECT 2'); diff --git a/ext/mysqli/tests/070.phpt b/ext/mysqli/tests/070.phpt index e849fe06f8c0..3f98cd46760c 100644 --- a/ext/mysqli/tests/070.phpt +++ b/ext/mysqli/tests/070.phpt @@ -4,11 +4,11 @@ mysqli ping mysqli --SKIPIF-- --FILE-- ping()); diff --git a/ext/mysqli/tests/071.phpt b/ext/mysqli/tests/071.phpt index 39d8ba775942..e1d36da47002 100644 --- a/ext/mysqli/tests/071.phpt +++ b/ext/mysqli/tests/071.phpt @@ -4,11 +4,11 @@ mysqli thread_id & kill mysqli --SKIPIF-- --FILE-- server_version; diff --git a/ext/mysqli/tests/072.phpt b/ext/mysqli/tests/072.phpt index 91f302335d94..d0c29b3be1f8 100644 --- a/ext/mysqli/tests/072.phpt +++ b/ext/mysqli/tests/072.phpt @@ -4,11 +4,11 @@ mysqli warning_count, get_warnings mysqli --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- multi_query('SELECT 1;SELECT 2'); diff --git a/ext/mysqli/tests/bug32405.phpt b/ext/mysqli/tests/bug32405.phpt index 51d3c19387fd..96e5130ea3dd 100644 --- a/ext/mysqli/tests/bug32405.phpt +++ b/ext/mysqli/tests/bug32405.phpt @@ -4,11 +4,11 @@ Bug #32405 (mysqli->fetch() is returning bad data) mysqli --SKIPIF-- --FILE-- --CLEAN-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- --FILE-- query("DROP TABLE IF EXISTS test_bint"); @@ -54,7 +54,7 @@ EOSQL; ?> --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- - + --EXPECT-- done! diff --git a/ext/mysqli/tests/bug36420.phpt b/ext/mysqli/tests/bug36420.phpt index 5d0b52fefeb1..3b603d2bd653 100644 --- a/ext/mysqli/tests/bug36420.phpt +++ b/ext/mysqli/tests/bug36420.phpt @@ -4,12 +4,12 @@ Bug #36420 (segfault when access result->num_rows after calling result->close()) mysqli --SKIPIF-- --FILE-- query('select 1'); diff --git a/ext/mysqli/tests/bug36745.phpt b/ext/mysqli/tests/bug36745.phpt index bbe11789b539..6c993eee3859 100644 --- a/ext/mysqli/tests/bug36745.phpt +++ b/ext/mysqli/tests/bug36745.phpt @@ -4,13 +4,13 @@ Bug #36745 (LOAD DATA LOCAL INFILE doesn't return correct error message) mysqli --SKIPIF-- --INI-- mysqli.allow_local_infile=1 --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --FILE-- stmt_init(); diff --git a/ext/mysqli/tests/bug39457.phpt b/ext/mysqli/tests/bug39457.phpt index 979a568ba07c..c72145fc4a40 100644 --- a/ext/mysqli/tests/bug39457.phpt +++ b/ext/mysqli/tests/bug39457.phpt @@ -4,11 +4,11 @@ Bug #39457 (Multiple invoked OO connections never close) mysqli --SKIPIF-- --FILE-- connect($host, $user, $passwd, $db, $port, $socket); diff --git a/ext/mysqli/tests/bug42378.phpt b/ext/mysqli/tests/bug42378.phpt index 75661c60b5af..67256859b484 100644 --- a/ext/mysqli/tests/bug42378.phpt +++ b/ext/mysqli/tests/bug42378.phpt @@ -4,13 +4,13 @@ Bug #42378 (bind_result memory exhaustion, SELECT column, FORMAT(...) AS _format mysqli --SKIPIF-- --INI-- memory_limit=83886080 --FILE-- --CLEAN-- --EXPECT-- FLOAT diff --git a/ext/mysqli/tests/bug42548.phpt b/ext/mysqli/tests/bug42548.phpt index dccfd5890415..6b1d2edd450b 100644 --- a/ext/mysqli/tests/bug42548.phpt +++ b/ext/mysqli/tests/bug42548.phpt @@ -52,7 +52,7 @@ print "done!"; ?> --CLEAN-- --FILE-- query('DROP PROCEDURE IF EXISTS p')) printf("[001] [%d] %s\n", $link->errno, $link->error); @@ -69,7 +69,7 @@ if (mysqli_get_server_version($link) <= 50000) { ?> --CLEAN-- --FILE-- --FILE-- close(); @@ -32,7 +32,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- [004] [%s diff --git a/ext/mysqli/tests/bug46109.phpt b/ext/mysqli/tests/bug46109.phpt index 62b40b962d94..47cb43bcbf9d 100644 --- a/ext/mysqli/tests/bug46109.phpt +++ b/ext/mysqli/tests/bug46109.phpt @@ -4,11 +4,11 @@ Bug #46109 (MySQLi::init - Memory leaks) mysqli --SKIPIF-- --FILE-- init(); diff --git a/ext/mysqli/tests/bug46614.phpt b/ext/mysqli/tests/bug46614.phpt index 34c03585dfbd..10a62f04ca01 100644 --- a/ext/mysqli/tests/bug46614.phpt +++ b/ext/mysqli/tests/bug46614.phpt @@ -4,7 +4,7 @@ Bug #46614 (Extended MySQLi class gives incorrect empty() result) mysqli --SKIPIF-- isEmpty(); diff --git a/ext/mysqli/tests/bug47050.phpt b/ext/mysqli/tests/bug47050.phpt index 151cd750f2b7..0f23b9ff8066 100644 --- a/ext/mysqli/tests/bug47050.phpt +++ b/ext/mysqli/tests/bug47050.phpt @@ -4,14 +4,14 @@ Bug #47050 (mysqli_poll() modifies improper variables) mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- done diff --git a/ext/mysqli/tests/bug49027.phpt b/ext/mysqli/tests/bug49027.phpt index 7bef3004d800..f77939f9fe08 100644 --- a/ext/mysqli/tests/bug49027.phpt +++ b/ext/mysqli/tests/bug49027.phpt @@ -4,11 +4,11 @@ Bug #49027 (mysqli_options() doesn't work when using mysqlnd) mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- array(1) { diff --git a/ext/mysqli/tests/bug49442.phpt b/ext/mysqli/tests/bug49442.phpt index e5741ead4d59..a5057c5028e1 100644 --- a/ext/mysqli/tests/bug49442.phpt +++ b/ext/mysqli/tests/bug49442.phpt @@ -23,7 +23,7 @@ mysqli.allow_persistent=1 mysqli.max_persistent=1 --FILE-- --CLEAN-- --EXPECT-- array(2) { diff --git a/ext/mysqli/tests/bug50772.phpt b/ext/mysqli/tests/bug50772.phpt index 4351e2108c55..0c61f9237b19 100644 --- a/ext/mysqli/tests/bug50772.phpt +++ b/ext/mysqli/tests/bug50772.phpt @@ -4,11 +4,11 @@ Bug #50772 (mysqli constructor without parameters does not return a working mysq mysqli --SKIPIF-- --FILE-- --INI-- mysqli.max_links = 1 @@ -12,7 +12,7 @@ mysqli.allow_persistent = Off mysqli.max_persistent = 0 --FILE-- close(); ?> --FILE-- --FILE-- options(MYSQLI_SET_CHARSET_NAME, "latin2"); if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) { diff --git a/ext/mysqli/tests/bug52891.phpt b/ext/mysqli/tests/bug52891.phpt index fc76f89b703a..2d73ae70733b 100644 --- a/ext/mysqli/tests/bug52891.phpt +++ b/ext/mysqli/tests/bug52891.phpt @@ -4,11 +4,11 @@ Bug #52891 (Wrong data inserted with mysqli/mysqlnd when using bind_param,value mysqli --SKIPIF-- --FILE-- --CLEAN-- --INI-- mysqli.max_links = 1 @@ -12,7 +12,7 @@ mysqli.allow_persistent = Off mysqli.max_persistent = 0 --FILE-- --INI-- mysqli.max_links = 1 @@ -12,7 +12,7 @@ mysqli.allow_persistent = Off mysqli.max_persistent = 0 --FILE-- close(); ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- Okey diff --git a/ext/mysqli/tests/bug66124.phpt b/ext/mysqli/tests/bug66124.phpt index c0059e171438..521c17e8fb99 100644 --- a/ext/mysqli/tests/bug66124.phpt +++ b/ext/mysqli/tests/bug66124.phpt @@ -20,7 +20,7 @@ $table_delete = "DELETE FROM `test`"; $id = '1311200011005001566'; -require_once('connect.inc'); +require_once 'connect.inc'; if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", @@ -93,7 +93,7 @@ $link->close(); done --CLEAN-- --EXPECT-- Using 'i': diff --git a/ext/mysqli/tests/bug66762.phpt b/ext/mysqli/tests/bug66762.phpt index 2864793805bc..0176e12e1ccd 100644 --- a/ext/mysqli/tests/bug66762.phpt +++ b/ext/mysqli/tests/bug66762.phpt @@ -4,11 +4,11 @@ Bug #66762 mysqli@libmysql segfault in mysqli_stmt::bind_result() when link clo mysqli --SKIPIF-- --FILE-- --INI-- precision=5 --FILE-- --CLEAN-- --EXPECT-- 1: 9.9999: 9.9999 diff --git a/ext/mysqli/tests/bug67983.phpt b/ext/mysqli/tests/bug67983.phpt index d6aebc35fef6..7146689d64e0 100644 --- a/ext/mysqli/tests/bug67983.phpt +++ b/ext/mysqli/tests/bug67983.phpt @@ -4,12 +4,12 @@ Bug #67983: mysqlnd with MYSQLI_OPT_INT_AND_FLOAT_NATIVE fails to interpret bit mysqli --SKIPIF-- --FILE-- --CLEAN-- server_version < 50709) { ?> --CLEAN-- --EXPECT-- OK diff --git a/ext/mysqli/tests/bug70949.phpt b/ext/mysqli/tests/bug70949.phpt index 15ae23dae2d0..e4bfb6b0641b 100644 --- a/ext/mysqli/tests/bug70949.phpt +++ b/ext/mysqli/tests/bug70949.phpt @@ -8,7 +8,7 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- query("DROP TABLE IF EXISTS bug70949"); @@ -43,7 +43,7 @@ if ($stmt = $mysql->prepare($sql)) ?> --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --FILE-- query('SET @@global.max_allowed_packet = 67108864'); diff --git a/ext/mysqli/tests/bug73949.phpt b/ext/mysqli/tests/bug73949.phpt index 7c5364c27473..65633d3dc5ba 100644 --- a/ext/mysqli/tests/bug73949.phpt +++ b/ext/mysqli/tests/bug73949.phpt @@ -4,11 +4,11 @@ Bug #73949 (leak in mysqli_fetch_object) mysqli --SKIPIF-- --FILE-- --FILE-- query('SET @@global.max_allowed_packet = 67108864'); diff --git a/ext/mysqli/tests/bug74547.phpt b/ext/mysqli/tests/bug74547.phpt index 49d2bc8d3e6a..a4516ea1a879 100644 --- a/ext/mysqli/tests/bug74547.phpt +++ b/ext/mysqli/tests/bug74547.phpt @@ -4,13 +4,13 @@ Bug #74547 mysqli::change_user() doesn't accept null as $database argument w/str mysqli --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- fetch_assoc()) { ?> --CLEAN-- --EXPECT-- string(1) "0" diff --git a/ext/mysqli/tests/bug75448.phpt b/ext/mysqli/tests/bug75448.phpt index 1ecb81b20030..fedcd3fb399a 100644 --- a/ext/mysqli/tests/bug75448.phpt +++ b/ext/mysqli/tests/bug75448.phpt @@ -4,7 +4,7 @@ mysqli_prepare() called on a closed connection should return FALSE (bug #75448) mysqli --SKIPIF-- --FILE-- free_result(); } else { - echo('[FIRST][FAIL] mysqli::prepare returned false: ' . $link->error . PHP_EOL); + echo '[FIRST][FAIL] mysqli::prepare returned false: ' . $link->error . PHP_EOL; } $link->close(); @@ -74,7 +74,7 @@ if ($stmt) { } $stmt->free_result(); } else { - echo('[SECOND][FAIL] mysqli::prepare returned false: ' . $link->error . PHP_EOL); + echo '[SECOND][FAIL] mysqli::prepare returned false: ' . $link->error . PHP_EOL; } $link->close(); ?> diff --git a/ext/mysqli/tests/bug77597.phpt b/ext/mysqli/tests/bug77597.phpt index ffc0ccf18976..bc9de640ea21 100644 --- a/ext/mysqli/tests/bug77597.phpt +++ b/ext/mysqli/tests/bug77597.phpt @@ -4,13 +4,13 @@ Bug #77597: mysqli_fetch_field hangs scripts mysqli --SKIPIF-- --FILE-- query('DROP TABLE IF EXISTS test'); @@ -27,7 +27,7 @@ var_dump($field->name); ?> --CLEAN-- --EXPECT-- string(1) "b" diff --git a/ext/mysqli/tests/bug77935.phpt b/ext/mysqli/tests/bug77935.phpt index 5ebf1e97e5f9..c2f2f9684b6d 100644 --- a/ext/mysqli/tests/bug77935.phpt +++ b/ext/mysqli/tests/bug77935.phpt @@ -4,11 +4,11 @@ Bug #77935: Crash in mysqlnd_fetch_stmt_row_cursor when calling an SP with a cur mysqli --SKIPIF-- --FILE-- --CLEAN-- --FILE-- --FILE-- --FILE-- close(); ?> --CLEAN-- --EXPECTF-- Running query on first connection diff --git a/ext/mysqli/tests/bug80837.phpt b/ext/mysqli/tests/bug80837.phpt index d4b37a268b2c..b8ad59eea231 100644 --- a/ext/mysqli/tests/bug80837.phpt +++ b/ext/mysqli/tests/bug80837.phpt @@ -9,7 +9,7 @@ if (!defined('MYSQLI_STORE_RESULT_COPY_DATA')) die('skip requires mysqlnd'); ?> --FILE-- close(); ?> --CLEAN-- --EXPECT-- Commands out of sync; you can't run this command now diff --git a/ext/mysqli/tests/bug_bits.phpt b/ext/mysqli/tests/bug_bits.phpt index 97e6dbe39b2a..73bc95aa98d9 100644 --- a/ext/mysqli/tests/bug_bits.phpt +++ b/ext/mysqli/tests/bug_bits.phpt @@ -4,12 +4,12 @@ Bug (Incorrectly decoding bit values / Malformed server packet. Field length poi mysqli --SKIPIF-- --FILE-- --CLEAN-- --FILE-- --FILE-- options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, true); @@ -22,7 +22,7 @@ var_dump($result->fetch_all()); ?> --CLEAN-- --EXPECT-- array(3) { diff --git a/ext/mysqli/tests/gh7932.phpt b/ext/mysqli/tests/gh7932.phpt index cc0317c314c4..ed6d2443608b 100644 --- a/ext/mysqli/tests/gh7932.phpt +++ b/ext/mysqli/tests/gh7932.phpt @@ -8,7 +8,7 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- --FILE-- query('SELECT 42'); diff --git a/ext/mysqli/tests/gh8267.phpt b/ext/mysqli/tests/gh8267.phpt index 805bd695a6f9..d7c0e8d80e93 100644 --- a/ext/mysqli/tests/gh8267.phpt +++ b/ext/mysqli/tests/gh8267.phpt @@ -4,11 +4,11 @@ Bug GH-8267 (MySQLi uses unsupported format specifier on Windows) mysqli --SKIPIF-- --FILE-- query("DROP TABLE IF EXISTS foo"); diff --git a/ext/mysqli/tests/gh9590.phpt b/ext/mysqli/tests/gh9590.phpt index 79f44c5d7d4a..df373f7d3b31 100644 --- a/ext/mysqli/tests/gh9590.phpt +++ b/ext/mysqli/tests/gh9590.phpt @@ -5,7 +5,7 @@ mysqli posix --SKIPIF-- ---FILE-- -multi_query("SELECT 1"); - var_dump($link->next_result()); // should return false - var_dump($link->store_result()); // now what happens here!? - - - // Returns only one result set - $link->multi_query("SELECT 1"); - var_dump($link->next_result()); - var_dump($link->use_result()); - - $link->close(); -?> ---CLEAN-- - ---EXPECT-- -bool(false) -object(mysqli_result)#3 (5) { - ["current_field"]=> - int(0) - ["field_count"]=> - int(1) - ["lengths"]=> - NULL - ["num_rows"]=> - int(1) - ["type"]=> - int(0) -} -bool(false) -object(mysqli_result)#3 (5) { - ["current_field"]=> - int(0) - ["field_count"]=> - int(1) - ["lengths"]=> - NULL - ["num_rows"]=> - int(0) - ["type"]=> - int(1) -} +--TEST-- +Fail gracefully on empty result set +--EXTENSIONS-- +mysqli +--SKIPIF-- + +--FILE-- +multi_query("SELECT 1"); + var_dump($link->next_result()); // should return false + var_dump($link->store_result()); // now what happens here!? + + + // Returns only one result set + $link->multi_query("SELECT 1"); + var_dump($link->next_result()); + var_dump($link->use_result()); + + $link->close(); +?> +--CLEAN-- + +--EXPECT-- +bool(false) +object(mysqli_result)#3 (5) { + ["current_field"]=> + int(0) + ["field_count"]=> + int(1) + ["lengths"]=> + NULL + ["num_rows"]=> + int(1) + ["type"]=> + int(0) +} +bool(false) +object(mysqli_result)#3 (5) { + ["current_field"]=> + int(0) + ["field_count"]=> + int(1) + ["lengths"]=> + NULL + ["num_rows"]=> + int(0) + ["type"]=> + int(1) +} diff --git a/ext/mysqli/tests/mysqli_affected_rows.phpt b/ext/mysqli/tests/mysqli_affected_rows.phpt index ebd505cb0ed7..2547720b3146 100644 --- a/ext/mysqli/tests/mysqli_affected_rows.phpt +++ b/ext/mysqli/tests/mysqli_affected_rows.phpt @@ -4,11 +4,11 @@ mysqli_affected_rows() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt index 8a82cb01a44a..69aec1ec24fd 100644 --- a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt +++ b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt @@ -4,11 +4,11 @@ mysqli->affected_rows mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- Property access is not allowed yet diff --git a/ext/mysqli/tests/mysqli_allow_local_infile_overrides_local_infile_directory.phpt b/ext/mysqli/tests/mysqli_allow_local_infile_overrides_local_infile_directory.phpt index 627c76ec539c..8625be91e1da 100644 --- a/ext/mysqli/tests/mysqli_allow_local_infile_overrides_local_infile_directory.phpt +++ b/ext/mysqli/tests/mysqli_allow_local_infile_overrides_local_infile_directory.phpt @@ -22,7 +22,7 @@ mysqli.allow_local_infile=1 mysqli.local_infile_directory={PWD}/foo/bar --FILE-- --CLEAN-- --CLEAN-- diff --git a/ext/mysqli/tests/mysqli_autocommit.phpt b/ext/mysqli/tests/mysqli_autocommit.phpt index 0da4e488e641..dae921c4140f 100644 --- a/ext/mysqli/tests/mysqli_autocommit.phpt +++ b/ext/mysqli/tests/mysqli_autocommit.phpt @@ -16,7 +16,7 @@ mysqli ?> --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_autocommit_oo.phpt b/ext/mysqli/tests/mysqli_autocommit_oo.phpt index 0c0dbee834f3..fe8ac72e02c5 100644 --- a/ext/mysqli/tests/mysqli_autocommit_oo.phpt +++ b/ext/mysqli/tests/mysqli_autocommit_oo.phpt @@ -15,7 +15,7 @@ mysqli ?> --FILE-- --CLEAN-- --EXPECT-- my_mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_begin_transaction.phpt b/ext/mysqli/tests/mysqli_begin_transaction.phpt index 20eda35cb3d5..7a7d7e36fba4 100644 --- a/ext/mysqli/tests/mysqli_begin_transaction.phpt +++ b/ext/mysqli/tests/mysqli_begin_transaction.phpt @@ -4,9 +4,9 @@ mysqli_begin_transaction() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- NULL diff --git a/ext/mysqli/tests/mysqli_change_user.phpt b/ext/mysqli/tests/mysqli_change_user.phpt index 2e3a772a7ed1..9628770994f8 100644 --- a/ext/mysqli/tests/mysqli_change_user.phpt +++ b/ext/mysqli/tests/mysqli_change_user.phpt @@ -4,11 +4,11 @@ mysqli_change_user() mysqli --SKIPIF-- --FILE-- --INI-- max_execution_time=240 --FILE-- --CLEAN-- --EXPECTF-- Testing GET_LOCK()... diff --git a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt index e220878c5bab..c4a39b756c80 100644 --- a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt @@ -54,7 +54,7 @@ require_once 'skipifconnectfailure.inc'; ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt b/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt index 4c72190b9c7a..36f5ec0329ca 100644 --- a/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt +++ b/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt @@ -4,13 +4,13 @@ mysqli_change_user() - table locks, GET_LOCK(), temporary tables mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_change_user_old.phpt b/ext/mysqli/tests/mysqli_change_user_old.phpt index db9e7ca18318..1e2bfcc302f3 100644 --- a/ext/mysqli/tests/mysqli_change_user_old.phpt +++ b/ext/mysqli/tests/mysqli_change_user_old.phpt @@ -4,7 +4,7 @@ mysqli_change_user(), MySQL < 5.6 mysqli --SKIPIF-- = 50600 && mysqli_get_server_version($link ?> --FILE-- = 50600) ?> --FILE-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_character_set.phpt b/ext/mysqli/tests/mysqli_character_set.phpt index 8e9e943528d5..092f5412c249 100644 --- a/ext/mysqli/tests/mysqli_character_set.phpt +++ b/ext/mysqli/tests/mysqli_character_set.phpt @@ -4,7 +4,7 @@ Fetching results from tables of different charsets. mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_character_set_name.phpt b/ext/mysqli/tests/mysqli_character_set_name.phpt index 364d9a0ea8a8..76e901c7975b 100644 --- a/ext/mysqli/tests/mysqli_character_set_name.phpt +++ b/ext/mysqli/tests/mysqli_character_set_name.phpt @@ -4,12 +4,12 @@ mysqli_character_set_name(), mysql_client_encoding() [alias] mysqli --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- - + --EXPECTF-- Without RS diff --git a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt index 946657d3ef8a..46c1348283db 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt @@ -4,12 +4,12 @@ Interface of the class mysqli_result mysqli --SKIPIF-- --FILE-- query('SELECT * FROM test'); diff --git a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt index c0101a8d9e41..40b8b224dc21 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt @@ -4,12 +4,12 @@ Interface of the class mysqli_stmt mysqli --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_commit_oo.phpt b/ext/mysqli/tests/mysqli_commit_oo.phpt index fd4c1bbf008c..f9c1865328fa 100644 --- a/ext/mysqli/tests/mysqli_commit_oo.phpt +++ b/ext/mysqli/tests/mysqli_commit_oo.phpt @@ -98,7 +98,7 @@ if (!have_innodb($link)) ?> --CLEAN-- --EXPECTF-- mysqli object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_connect.phpt b/ext/mysqli/tests/mysqli_connect.phpt index f229515f0de0..cf276d6886f6 100644 --- a/ext/mysqli/tests/mysqli_connect.phpt +++ b/ext/mysqli/tests/mysqli_connect.phpt @@ -4,11 +4,11 @@ mysqli_connect() mysqli --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- mysqli_data_seek(): Argument #2 ($offset) must be greater than or equal to 0 diff --git a/ext/mysqli/tests/mysqli_data_seek_oo.phpt b/ext/mysqli/tests/mysqli_data_seek_oo.phpt index 8801b7394eba..b9870cd407ff 100644 --- a/ext/mysqli/tests/mysqli_data_seek_oo.phpt +++ b/ext/mysqli/tests/mysqli_data_seek_oo.phpt @@ -4,12 +4,12 @@ mysqli_result->data_seek() mysqli --SKIPIF-- --FILE-- --EXPECT-- mysqli_result object is already closed diff --git a/ext/mysqli/tests/mysqli_debug.phpt b/ext/mysqli/tests/mysqli_debug.phpt index 25cd8f2c8d6b..510de3dae00a 100644 --- a/ext/mysqli/tests/mysqli_debug.phpt +++ b/ext/mysqli/tests/mysqli_debug.phpt @@ -4,7 +4,7 @@ mysqli_debug() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- done%s diff --git a/ext/mysqli/tests/mysqli_debug_append.phpt b/ext/mysqli/tests/mysqli_debug_append.phpt index 1c26d469f51d..f3f24cb9e341 100644 --- a/ext/mysqli/tests/mysqli_debug_append.phpt +++ b/ext/mysqli/tests/mysqli_debug_append.phpt @@ -4,7 +4,7 @@ mysqli_debug() - append to trace file mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- done%s diff --git a/ext/mysqli/tests/mysqli_debug_control_string.phpt b/ext/mysqli/tests/mysqli_debug_control_string.phpt index eec3a669d2a9..b745ed2ebce8 100644 --- a/ext/mysqli/tests/mysqli_debug_control_string.phpt +++ b/ext/mysqli/tests/mysqli_debug_control_string.phpt @@ -4,7 +4,7 @@ mysqli_debug() - invalid debug control strings mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- string(32) "t:O,/tmp/mysqli_debug_phpt.trace" diff --git a/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt b/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt index 5c2f58e9f3d4..e46f4aed1984 100644 --- a/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt +++ b/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt @@ -4,7 +4,7 @@ mysqli_debug() - all control string options supported by both mysqlnd and libmys mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- [083][control string 'n:O,%smysqli_debug_phpt.trace'] Trace file has not been written. diff --git a/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt b/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt index 8d9058439752..ccee53b02cf9 100644 --- a/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt +++ b/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt @@ -121,7 +121,7 @@ if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED) ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_driver.phpt b/ext/mysqli/tests/mysqli_driver.phpt index 79f62cc8685a..76ffb44080ea 100644 --- a/ext/mysqli/tests/mysqli_driver.phpt +++ b/ext/mysqli/tests/mysqli_driver.phpt @@ -4,11 +4,11 @@ mysqli_driver class mysqli --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- errno mysqli --SKIPIF-- --FILE-- --FILE-- error mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECTF-- [005] [1064] You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'some random gibberish' at line 1 diff --git a/ext/mysqli/tests/mysqli_expire_password.phpt b/ext/mysqli/tests/mysqli_expire_password.phpt index fa1b9a94b0f5..8cfd8bd772dd 100644 --- a/ext/mysqli/tests/mysqli_expire_password.phpt +++ b/ext/mysqli/tests/mysqli_expire_password.phpt @@ -4,7 +4,7 @@ MySQL 5.6 / MariaDB 10.4.3 EXPIRE PASSWORD protocol change mysqli --SKIPIF-- --FILE-- --CLEAN-- diff --git a/ext/mysqli/tests/mysqli_explain_metadata.phpt b/ext/mysqli/tests/mysqli_explain_metadata.phpt index af8d153bc759..320f2c712459 100644 --- a/ext/mysqli/tests/mysqli_explain_metadata.phpt +++ b/ext/mysqli/tests/mysqli_explain_metadata.phpt @@ -153,7 +153,7 @@ require_once 'skipifconnectfailure.inc'; ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_all.phpt b/ext/mysqli/tests/mysqli_fetch_all.phpt index cfd28261c080..d396f27a1049 100644 --- a/ext/mysqli/tests/mysqli_fetch_all.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all.phpt @@ -4,13 +4,13 @@ mysqli_fetch_all() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- [005] diff --git a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt index 8a5b5bfbd989..edea32b7f073 100644 --- a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt @@ -4,11 +4,11 @@ $mysqli->fetch_all() (introduced with mysqlnd) mysqli --SKIPIF-- --FILE-- query("SELECT * FROM test ORDER BY id LIMIT 2")) { printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error); } @@ -305,7 +305,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- [005] diff --git a/ext/mysqli/tests/mysqli_fetch_array.phpt b/ext/mysqli/tests/mysqli_fetch_array.phpt index 617ea91ff03a..8e745fb1d4eb 100644 --- a/ext/mysqli/tests/mysqli_fetch_array.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array.phpt @@ -4,13 +4,13 @@ mysqli_fetch_array() - all datatypes but BIT mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- [002] diff --git a/ext/mysqli/tests/mysqli_fetch_array_large.phpt b/ext/mysqli/tests/mysqli_fetch_array_large.phpt index 21b74e8ab7ae..fa8d33b76964 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_large.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_large.phpt @@ -5,7 +5,7 @@ mysqli --SKIPIF-- --CONFLICTS-- all @@ -13,7 +13,7 @@ all memory_limit=-1 --FILE-- --CLEAN-- --EXPECTF-- stop: %s diff --git a/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt b/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt index a96e4f5d32d1..ebdf30d439be 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt @@ -4,11 +4,11 @@ mysqli_fetch_array() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt index 8695166338c1..c473981945e2 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt @@ -4,16 +4,16 @@ mysqli->fetch_array() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- [005] diff --git a/ext/mysqli/tests/mysqli_fetch_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_assoc.phpt index 80546ca19856..de8338ad5f65 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc.phpt @@ -4,15 +4,15 @@ mysqli_fetch_assoc() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- [005] diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt index 3e2bfea66aee..76b6e6fb1bc3 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt @@ -107,7 +107,7 @@ if (mysqli_get_server_version($link) < 50003) ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_no_alias.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_no_alias.phpt index 7d48ff1193a2..418a22a223e2 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_no_alias.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_no_alias.phpt @@ -4,11 +4,11 @@ mysqli_fetch_assoc() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- [003] diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt index bc3cf54d16f0..82cf1299c033 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt @@ -4,11 +4,11 @@ mysqli_fetch_assoc() mysqli --SKIPIF-- --FILE-- getMessage() . "\n"; } - require('table.inc'); + require 'table.inc'; if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); @@ -58,7 +58,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt index 147310ecc57a..ae136ec4a511 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt @@ -4,12 +4,12 @@ mysqli_fetch_assoc() - ZEROFILL mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_column.phpt b/ext/mysqli/tests/mysqli_fetch_column.phpt index fddb41687d8a..8b011628889c 100644 --- a/ext/mysqli/tests/mysqli_fetch_column.phpt +++ b/ext/mysqli/tests/mysqli_fetch_column.phpt @@ -9,7 +9,7 @@ require_once 'skipifconnectfailure.inc'; --FILE-- --CLEAN-- --EXPECT-- [001] diff --git a/ext/mysqli/tests/mysqli_fetch_field.phpt b/ext/mysqli/tests/mysqli_fetch_field.phpt index 512ae27b8276..b30da3822900 100644 --- a/ext/mysqli/tests/mysqli_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field.phpt @@ -4,15 +4,15 @@ mysqli_fetch_field() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- object(stdClass)#%d (13) { diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt index 1bd5538afba2..5e33cacd4738 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt @@ -4,13 +4,13 @@ mysqli_fetch_field_direct() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- mysqli_fetch_field_direct(): Argument #2 ($index) must be greater than or equal to 0 diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt index 238eeb65e9c6..24d88b297dc7 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt @@ -4,11 +4,11 @@ $res->fetch_field_direct(s) mysqli --SKIPIF-- --FILE-- getMessage() . "\n"; } - require('table.inc'); + require 'table.inc'; if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", @@ -54,7 +54,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt index 9874fff49f8e..53eb3e691694 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt @@ -15,7 +15,7 @@ mysqli_close($link); ?> --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt index 6c43ea6bd5f1..67f1b048950f 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt @@ -4,11 +4,11 @@ mysqli_fetch_field() mysqli --SKIPIF-- --FILE-- getMessage() . "\n"; } - require('table.inc'); + require 'table.inc'; if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); @@ -63,7 +63,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_fetch_field_types.phpt b/ext/mysqli/tests/mysqli_fetch_field_types.phpt index 99e64ca45b47..041eb16694a7 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_types.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_types.phpt @@ -4,11 +4,11 @@ mysqli_fetch_field() - data types/field->type mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_fields.phpt b/ext/mysqli/tests/mysqli_fetch_fields.phpt index 47ed37e5889c..f87e3dc235e3 100644 --- a/ext/mysqli/tests/mysqli_fetch_fields.phpt +++ b/ext/mysqli/tests/mysqli_fetch_fields.phpt @@ -4,15 +4,15 @@ mysqli_fetch_fields() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- object(stdClass)#%d (13) { diff --git a/ext/mysqli/tests/mysqli_fetch_lengths.phpt b/ext/mysqli/tests/mysqli_fetch_lengths.phpt index dae6588319de..36d805f99af3 100644 --- a/ext/mysqli/tests/mysqli_fetch_lengths.phpt +++ b/ext/mysqli/tests/mysqli_fetch_lengths.phpt @@ -4,18 +4,18 @@ mysqli_fetch_lengths() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- bool(false) diff --git a/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt b/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt index 261860531613..691ee1192573 100644 --- a/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt @@ -4,16 +4,16 @@ mysqli_result->lengths mysqli --SKIPIF-- --FILE-- query("SELECT id, label FROM test ORDER BY id LIMIT 1")) { printf("[002] [%d] %s\n", $mysqli->errno, $mysqli->error); } @@ -34,10 +34,10 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- NULL diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index e409677146c6..45d29bbd2e8b 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -4,13 +4,13 @@ mysqli_fetch_object() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- ArgumentCountError: Too few arguments to function mysqli_fetch_object_construct::__construct(), 0 passed and exactly 2 expected diff --git a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt index 371299808ce2..6af2196b9a1d 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt @@ -4,16 +4,16 @@ mysqli_fetch_object() - calling constructor on class wo constructor mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- No exception with PHP: diff --git a/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt b/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt index 204cd932e892..3622abfa27cf 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt @@ -4,11 +4,11 @@ mysqli_fetch_object() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- %s(6) "object" diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index 56880828c355..c1ecc3fd312c 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -4,11 +4,11 @@ mysqli_fetch_object() mysqli --SKIPIF-- --FILE-- getMessage(), "\n"; } - require('table.inc'); + require 'table.inc'; if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); @@ -124,7 +124,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- Error: mysqli object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_fetch_row.phpt b/ext/mysqli/tests/mysqli_fetch_row.phpt index a1f544dbbc33..58bca0acbd45 100644 --- a/ext/mysqli/tests/mysqli_fetch_row.phpt +++ b/ext/mysqli/tests/mysqli_fetch_row.phpt @@ -4,13 +4,13 @@ mysqli_fetch_row() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- [004] diff --git a/ext/mysqli/tests/mysqli_field_count.phpt b/ext/mysqli/tests/mysqli_field_count.phpt index bcc0c6e21161..7266a00051cc 100644 --- a/ext/mysqli/tests/mysqli_field_count.phpt +++ b/ext/mysqli/tests/mysqli_field_count.phpt @@ -4,13 +4,13 @@ mysqli_field_count() mysqli --SKIPIF-- --FILE-- --EXPECT-- int(0) diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt index c4508fa5482d..80992532a373 100644 --- a/ext/mysqli/tests/mysqli_field_seek.phpt +++ b/ext/mysqli/tests/mysqli_field_seek.phpt @@ -4,7 +4,7 @@ mysqli_field_seek() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- mysqli_field_seek(): Argument #2 ($index) must be greater than or equal to 0 diff --git a/ext/mysqli/tests/mysqli_field_tell.phpt b/ext/mysqli/tests/mysqli_field_tell.phpt index cb1dcc3b98e8..c863bc49c131 100644 --- a/ext/mysqli/tests/mysqli_field_tell.phpt +++ b/ext/mysqli/tests/mysqli_field_tell.phpt @@ -4,13 +4,13 @@ mysqli_field_tell() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- int(0) diff --git a/ext/mysqli/tests/mysqli_fork.phpt b/ext/mysqli/tests/mysqli_fork.phpt index 411b12938753..f8ba36edafb4 100644 --- a/ext/mysqli/tests/mysqli_fork.phpt +++ b/ext/mysqli/tests/mysqli_fork.phpt @@ -20,7 +20,7 @@ if (!have_innodb($link)) ?> --FILE-- --CLEAN-- --FILE-- --CLEAN-- --EXPECT-- a diff --git a/ext/mysqli/tests/mysqli_get_charset.phpt b/ext/mysqli/tests/mysqli_get_charset.phpt index f902b11746b1..abd85fbab538 100644 --- a/ext/mysqli/tests/mysqli_get_charset.phpt +++ b/ext/mysqli/tests/mysqli_get_charset.phpt @@ -4,15 +4,15 @@ mysqli_get_charset() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_get_client_stats.phpt b/ext/mysqli/tests/mysqli_get_client_stats.phpt index aea4d3c0a0be..141a39012716 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats.phpt @@ -4,7 +4,7 @@ mysqli_get_client_stats() mysqli --SKIPIF-- --CLEAN-- --CLEAN-- --EXPECTF-- BEGINNING: implicit_free_result = %d diff --git a/ext/mysqli/tests/mysqli_get_client_stats_off.phpt b/ext/mysqli/tests/mysqli_get_client_stats_off.phpt index 4faf1ffc204d..67459a8799c8 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_off.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_off.phpt @@ -4,7 +4,7 @@ mysqli_get_client_stats() - php_ini setting mysqli --SKIPIF-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_client_stats_ps.phpt b/ext/mysqli/tests/mysqli_get_client_stats_ps.phpt index a348c38290cd..bfa8cc370c28 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_ps.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_ps.phpt @@ -4,7 +4,7 @@ mysqli_get_client_stats() - PS mysqli --SKIPIF-- --CLEAN-- --EXPECTF-- BEGINNING: rows_fetched_from_client_ps_unbuffered = %d diff --git a/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt b/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt index 7bd92e88e6dd..babf964fdaab 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt @@ -7,15 +7,15 @@ mysqlnd.collect_memory_statistics="1" mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt b/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt index 3cfa6400de6d..ca9642a1ef35 100644 --- a/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt +++ b/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt @@ -7,7 +7,7 @@ mysqlnd.collect_memory_statistics="0" mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_proto_info.phpt b/ext/mysqli/tests/mysqli_get_proto_info.phpt index e0c41c09d7bf..0300aaacb033 100644 --- a/ext/mysqli/tests/mysqli_get_proto_info.phpt +++ b/ext/mysqli/tests/mysqli_get_proto_info.phpt @@ -4,13 +4,13 @@ mysqli_get_proto_info() mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_server_version.phpt b/ext/mysqli/tests/mysqli_get_server_version.phpt index 1a8958035466..0b714644a635 100644 --- a/ext/mysqli/tests/mysqli_get_server_version.phpt +++ b/ext/mysqli/tests/mysqli_get_server_version.phpt @@ -4,13 +4,13 @@ mysqli_get_server_version() mysqli --SKIPIF-- --FILE-- 50105 -- major_version*10000 + minor_version *100 + sub_version */ /* < 30000 = pre 3.2.3, very unlikely! */ if (!is_int($info = mysqli_get_server_version($link)) || ($info < (3 * 10000))) diff --git a/ext/mysqli/tests/mysqli_get_warnings.phpt b/ext/mysqli/tests/mysqli_get_warnings.phpt index 2d2a0042d83a..1c2087e88eb5 100644 --- a/ext/mysqli/tests/mysqli_get_warnings.phpt +++ b/ext/mysqli/tests/mysqli_get_warnings.phpt @@ -10,7 +10,7 @@ if (!$TEST_EXPERIMENTAL) ?> --FILE-- --INI-- mysqli.allow_local_infile=1 --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_init.phpt b/ext/mysqli/tests/mysqli_init.phpt index 5bed5e4be793..94cce958c435 100644 --- a/ext/mysqli/tests/mysqli_init.phpt +++ b/ext/mysqli/tests/mysqli_init.phpt @@ -4,7 +4,7 @@ mysqli_init() mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_insert_id_variation.phpt b/ext/mysqli/tests/mysqli_insert_id_variation.phpt index d555ddedc205..593cf2ed9ebc 100644 --- a/ext/mysqli/tests/mysqli_insert_id_variation.phpt +++ b/ext/mysqli/tests/mysqli_insert_id_variation.phpt @@ -4,11 +4,11 @@ Checking last_insert_id after different operations mysqli --SKIPIF-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --EXPECTF-- mysqli_kill(): Argument #2 ($process_id) must be greater than 0 diff --git a/ext/mysqli/tests/mysqli_last_insert_id.phpt b/ext/mysqli/tests/mysqli_last_insert_id.phpt index 88a3702d2b2e..27814aebdf08 100644 --- a/ext/mysqli/tests/mysqli_last_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_last_insert_id.phpt @@ -4,7 +4,7 @@ API vs. SQL LAST_INSERT_ID() mysqli --SKIPIF-- --FILE-- query("SELECT LAST_INSERT_ID() AS _id"))) { @@ -177,7 +177,7 @@ mysqli ?> --CLEAN-- --EXPECTF-- API: %d, SQL: %d diff --git a/ext/mysqli/tests/mysqli_local_infile_default_off.phpt b/ext/mysqli/tests/mysqli_local_infile_default_off.phpt index 63784703acf1..8bf1ba67135c 100644 --- a/ext/mysqli/tests/mysqli_local_infile_default_off.phpt +++ b/ext/mysqli/tests/mysqli_local_infile_default_off.phpt @@ -4,11 +4,11 @@ ensure default for local infile is off mysqli --SKIPIF-- --FILE-- --CLEAN-- --INI-- mysqli.allow_local_infile=1 --FILE-- --INI-- mysqli.max_links=1 --FILE-- --CLEAN-- --EXPECTF-- bool(true) diff --git a/ext/mysqli/tests/mysqli_more_results.phpt b/ext/mysqli/tests/mysqli_more_results.phpt index ac0926d66fa6..91ec38886634 100644 --- a/ext/mysqli/tests/mysqli_more_results.phpt +++ b/ext/mysqli/tests/mysqli_more_results.phpt @@ -4,13 +4,13 @@ mysqli_more_results() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- [004] diff --git a/ext/mysqli/tests/mysqli_multi_query.phpt b/ext/mysqli/tests/mysqli_multi_query.phpt index 76c3b598aa8f..ff5c3d442372 100644 --- a/ext/mysqli/tests/mysqli_multi_query.phpt +++ b/ext/mysqli/tests/mysqli_multi_query.phpt @@ -4,13 +4,13 @@ mysqli_multi_query() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- [006] 3 diff --git a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout.phpt b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout.phpt index 95e11db9a6dd..59a8719cbbe6 100644 --- a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout.phpt +++ b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout.phpt @@ -12,7 +12,7 @@ max_execution_time=60 mysqlnd.net_read_timeout=1 --FILE-- default_socket_timeout mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_next_result_error.phpt b/ext/mysqli/tests/mysqli_next_result_error.phpt index 84c39083494d..91ac2363177a 100644 --- a/ext/mysqli/tests/mysqli_next_result_error.phpt +++ b/ext/mysqli/tests/mysqli_next_result_error.phpt @@ -4,7 +4,7 @@ Error in multi query mysqli --SKIPIF-- --FILE-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- mysqli_result object is already closed diff --git a/ext/mysqli/tests/mysqli_num_rows.phpt b/ext/mysqli/tests/mysqli_num_rows.phpt index 58202f12cd4c..d8e55adb86af 100644 --- a/ext/mysqli/tests/mysqli_num_rows.phpt +++ b/ext/mysqli/tests/mysqli_num_rows.phpt @@ -4,13 +4,13 @@ mysqli_num_rows() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_result object is already closed diff --git a/ext/mysqli/tests/mysqli_open_bug74432.phpt b/ext/mysqli/tests/mysqli_open_bug74432.phpt index 72800439da12..91b7a858718f 100644 --- a/ext/mysqli/tests/mysqli_open_bug74432.phpt +++ b/ext/mysqli/tests/mysqli_open_bug74432.phpt @@ -4,7 +4,7 @@ Bug #74432, BC issue on undocumented connect string mysqli --SKIPIF-- --FILE-- --FILE-- --FILE-- --CLEAN-- --EXPECTF-- Warning: mysqli_real_connect(): (%s/%d): %s in %s on line %d diff --git a/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt b/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt index ecf8bc5cfbeb..c11e0deeb7d2 100644 --- a/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt +++ b/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt @@ -8,7 +8,7 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_options_openbasedir.phpt b/ext/mysqli/tests/mysqli_options_openbasedir.phpt index e27e85e731f1..823eca9ef0b3 100644 --- a/ext/mysqli/tests/mysqli_options_openbasedir.phpt +++ b/ext/mysqli/tests/mysqli_options_openbasedir.phpt @@ -4,11 +4,11 @@ mysqli_options() - MYSQLI_OPT_LOCAL_INFILE and open_basedir mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- query('DROP USER shatest'); $link->query('DROP USER shatest@localhost'); ?> diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt index 42a9640f1ea9..986c19f47690 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt @@ -91,7 +91,7 @@ echo "nocache"; mysqlnd.sha256_server_public_key="test_sha256_ini" --FILE-- --CLEAN-- query('DROP USER shatest'); $link->query('DROP USER shatest@localhost'); $file = "test_sha256_ini"; diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt index e0abe65e24e4..25c87565a13c 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt @@ -86,7 +86,7 @@ echo "nocache"; ?> --FILE-- --CLEAN-- query('DROP USER shatest'); $link->query('DROP USER shatest@localhost'); $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd")); diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt index 5f13fa4f03f0..5c4a60cd0066 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt @@ -86,7 +86,7 @@ echo "nocache"; ?> --FILE-- --CLEAN-- query('DROP USER shatest'); $link->query('DROP USER shatest@localhost'); $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd")); diff --git a/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt b/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt index ae3f4cb2ec23..795c8664a222 100644 --- a/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt +++ b/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt @@ -4,7 +4,7 @@ Calling connect() on an open persistent connection to create a new persistent co mysqli --SKIPIF-- --INI-- mysqli.allow_persistent=1 @@ -12,7 +12,7 @@ mysqli.max_persistent=-1 mysqli.max_links=-1 --FILE-- @@ -14,7 +14,7 @@ mysqli.max_persistent=2 mysqli.max_links=2 --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_pconn_limits.phpt b/ext/mysqli/tests/mysqli_pconn_limits.phpt index 4d9f8eed01ca..650e26261906 100644 --- a/ext/mysqli/tests/mysqli_pconn_limits.phpt +++ b/ext/mysqli/tests/mysqli_pconn_limits.phpt @@ -12,7 +12,7 @@ mysqli.max_persistent=-1 mysqli.max_links=-1 --FILE-- --CLEAN-- --EXPECT-- Regular connection 1 - 'works..' diff --git a/ext/mysqli/tests/mysqli_pconn_max_links.phpt b/ext/mysqli/tests/mysqli_pconn_max_links.phpt index e923fc71baac..4cf28f6819e0 100644 --- a/ext/mysqli/tests/mysqli_pconn_max_links.phpt +++ b/ext/mysqli/tests/mysqli_pconn_max_links.phpt @@ -4,8 +4,8 @@ Persistent connections and mysqli.max_links mysqli --SKIPIF-- --CLEAN-- --INI-- mysqli.allow_persistent=1 @@ -14,7 +14,7 @@ mysqli.max_persistent=2 mysqli.max_links=2 --FILE-- --INI-- @@ -13,7 +13,7 @@ mysqli.max_persistent=-1 mysqli.max_links=-1 --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --EXPECT-- a) [1065] Query was empty diff --git a/ext/mysqli/tests/mysqli_ps_select_union.phpt b/ext/mysqli/tests/mysqli_ps_select_union.phpt index 46bb3115cafc..bd403c31e506 100644 --- a/ext/mysqli/tests/mysqli_ps_select_union.phpt +++ b/ext/mysqli/tests/mysqli_ps_select_union.phpt @@ -4,12 +4,12 @@ Prepared Statements and SELECT UNION mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --EXPECTF-- --- Testing default --- diff --git a/ext/mysqli/tests/mysqli_query_stored_proc.phpt b/ext/mysqli/tests/mysqli_query_stored_proc.phpt index 6f71ed0b9757..dbd22fbb38f4 100644 --- a/ext/mysqli/tests/mysqli_query_stored_proc.phpt +++ b/ext/mysqli/tests/mysqli_query_stored_proc.phpt @@ -151,7 +151,7 @@ END;')) { ?> --CLEAN-- --INI-- mysqli.allow_local_infile=1 --FILE-- --CLEAN-- --EXPECTF-- Warning: mysqli_real_connect(): (%s/%d): Access denied for user '%s'@'%s' %r(\(using password: \w+\) ){0,1}%rin %s on line %d diff --git a/ext/mysqli/tests/mysqli_real_connect_compression_error.phpt b/ext/mysqli/tests/mysqli_real_connect_compression_error.phpt index a72c1a74dbee..7a452d3a23cf 100644 --- a/ext/mysqli/tests/mysqli_real_connect_compression_error.phpt +++ b/ext/mysqli/tests/mysqli_real_connect_compression_error.phpt @@ -4,7 +4,7 @@ Bug #80107 mysqli_query() fails for ~16 MB long query when compression is enable mysqli --SKIPIF-- fetch_assoc()['Value'] < 0xffffff) { --FILE-- close(); ?> --CLEAN-- --EXPECT-- array(0) { diff --git a/ext/mysqli/tests/mysqli_real_connect_pconn.phpt b/ext/mysqli/tests/mysqli_real_connect_pconn.phpt index b2bd61978e77..5aa6c14d4cd2 100644 --- a/ext/mysqli/tests/mysqli_real_connect_pconn.phpt +++ b/ext/mysqli/tests/mysqli_real_connect_pconn.phpt @@ -12,7 +12,7 @@ mysqli.allow_persistent=1 mysqli.max_persistent=10 --FILE-- --CLEAN-- --EXPECTF-- Warning: mysqli_real_connect(): (%s/%d): Access denied for user '%s'@'%s' %r(\(using password: \w+\) ){0,1}%rin %s on line %d diff --git a/ext/mysqli/tests/mysqli_real_escape_string.phpt b/ext/mysqli/tests/mysqli_real_escape_string.phpt index 38d9678c31e9..11e6d04fcdb6 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string.phpt @@ -4,13 +4,13 @@ mysqli_real_escape_string() mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt b/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt index bea70cb3e5a9..ffc96d997960 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt @@ -5,8 +5,8 @@ mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt b/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt index b85b229aadd9..316d8e8570d8 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt @@ -5,8 +5,8 @@ mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt b/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt index dcc645d8671a..3ebd07a6330d 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt @@ -5,8 +5,8 @@ mysqli --SKIPIF-- --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt b/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt index 5b3f079de5c9..b993177ea136 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt @@ -4,8 +4,8 @@ mysqli_real_escape_string() - gbk mysqli --SKIPIF-- --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_nobackslash.phpt b/ext/mysqli/tests/mysqli_real_escape_string_nobackslash.phpt index 853ace720dc7..cb33a53f8924 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_nobackslash.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_nobackslash.phpt @@ -4,12 +4,12 @@ mysqli_real_escape_string() - SQL Mode NO_BACKSLASH_ESCAPE mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_real_query.phpt b/ext/mysqli/tests/mysqli_real_query.phpt index 6601525b4755..92d9b5bf7782 100644 --- a/ext/mysqli/tests/mysqli_real_query.phpt +++ b/ext/mysqli/tests/mysqli_real_query.phpt @@ -4,13 +4,13 @@ mysqli_real_query() mysqli --SKIPIF-- --FILE-- --CLEAN-- --FILE-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- mysqli_release_savepoint(): Argument #2 ($name) cannot be empty diff --git a/ext/mysqli/tests/mysqli_report.phpt b/ext/mysqli/tests/mysqli_report.phpt index 91a88815fd44..b4998546d137 100644 --- a/ext/mysqli/tests/mysqli_report.phpt +++ b/ext/mysqli/tests/mysqli_report.phpt @@ -309,7 +309,7 @@ require_once 'skipifconnectfailure.inc'; ?> --CLEAN-- --EXPECTF-- Warning: mysqli_multi_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'BAR; FOO' at line 1 in %s on line %d diff --git a/ext/mysqli/tests/mysqli_report_new.phpt b/ext/mysqli/tests/mysqli_report_new.phpt index e544bcb3664d..50be858eb17b 100644 --- a/ext/mysqli/tests/mysqli_report_new.phpt +++ b/ext/mysqli/tests/mysqli_report_new.phpt @@ -37,7 +37,7 @@ if (mysqli_get_server_version($link) < 50600) ?> --CLEAN-- --EXPECTF-- Warning: mysqli_change_user(): (%d/%d): Access denied for user '%s'@'%s' (using password: %s) in %s on line %d diff --git a/ext/mysqli/tests/mysqli_report_wo_ps.phpt b/ext/mysqli/tests/mysqli_report_wo_ps.phpt index c757de773db5..1bab3e0ad9ea 100644 --- a/ext/mysqli/tests/mysqli_report_wo_ps.phpt +++ b/ext/mysqli/tests/mysqli_report_wo_ps.phpt @@ -4,7 +4,7 @@ mysqli_report(), MySQL < 5.6 mysqli --SKIPIF-- = 50600) ?> --CLEAN-- --EXPECTF-- Warning: mysqli_multi_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'BAR; FOO' at line 1 in %s on line %d diff --git a/ext/mysqli/tests/mysqli_result_invalid_mode.phpt b/ext/mysqli/tests/mysqli_result_invalid_mode.phpt index 1a1677589d5c..aeac038682e5 100644 --- a/ext/mysqli/tests/mysqli_result_invalid_mode.phpt +++ b/ext/mysqli/tests/mysqli_result_invalid_mode.phpt @@ -4,12 +4,12 @@ mysqli_result(), invalid mode mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_result::__construct(): Argument #2 ($result_mode) must be either MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT diff --git a/ext/mysqli/tests/mysqli_result_references.phpt b/ext/mysqli/tests/mysqli_result_references.phpt index 0e2e2d98be02..a7345de0bfac 100644 --- a/ext/mysqli/tests/mysqli_result_references.phpt +++ b/ext/mysqli/tests/mysqli_result_references.phpt @@ -4,14 +4,14 @@ References to result sets mysqli --SKIPIF-- --INI-- opcache.enable=0 --FILE-- --CLEAN-- --EXPECTF-- array(7) refcount(2){ diff --git a/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt b/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt index 9b7119ac21d9..4087d35055ea 100644 --- a/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt +++ b/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt @@ -49,7 +49,7 @@ require_once 'skipifconnectfailure.inc'; ?> --CLEAN-- --EXPECTF-- array(1) refcount(%d){ diff --git a/ext/mysqli/tests/mysqli_result_unclonable.phpt b/ext/mysqli/tests/mysqli_result_unclonable.phpt index 0605e916a29c..b54c39f7a170 100644 --- a/ext/mysqli/tests/mysqli_result_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_result_unclonable.phpt @@ -4,11 +4,11 @@ Trying to clone mysqli_result object mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_savepoint.phpt b/ext/mysqli/tests/mysqli_savepoint.phpt index 71e0b2d21819..810a0842498e 100644 --- a/ext/mysqli/tests/mysqli_savepoint.phpt +++ b/ext/mysqli/tests/mysqli_savepoint.phpt @@ -13,7 +13,7 @@ if (!have_innodb($link)) ?> --FILE-- --CLEAN-- --EXPECT-- mysqli_savepoint(): Argument #2 ($name) cannot be empty diff --git a/ext/mysqli/tests/mysqli_select_db.phpt b/ext/mysqli/tests/mysqli_select_db.phpt index 76f64df743ca..33c55c12409c 100644 --- a/ext/mysqli/tests/mysqli_select_db.phpt +++ b/ext/mysqli/tests/mysqli_select_db.phpt @@ -4,12 +4,12 @@ mysqli_select_db() mysqli --SKIPIF-- --FILE-- --CLEAN-- - + --EXPECT-- mysqli object is already closed done! diff --git a/ext/mysqli/tests/mysqli_set_charset.phpt b/ext/mysqli/tests/mysqli_set_charset.phpt index 50da0c217e34..6425eb074854 100644 --- a/ext/mysqli/tests/mysqli_set_charset.phpt +++ b/ext/mysqli/tests/mysqli_set_charset.phpt @@ -125,7 +125,7 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR ?> --CLEAN-- --EXPECTF-- Exception: %s diff --git a/ext/mysqli/tests/mysqli_set_opt.phpt b/ext/mysqli/tests/mysqli_set_opt.phpt index c6868e2e4188..218e9f517786 100644 --- a/ext/mysqli/tests/mysqli_set_opt.phpt +++ b/ext/mysqli/tests/mysqli_set_opt.phpt @@ -4,11 +4,11 @@ mysqli_set_opt() mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECTF-- %s(5) "00000" diff --git a/ext/mysqli/tests/mysqli_ssl_set.phpt b/ext/mysqli/tests/mysqli_ssl_set.phpt index 5ea79b964987..fe692edede0c 100644 --- a/ext/mysqli/tests/mysqli_ssl_set.phpt +++ b/ext/mysqli/tests/mysqli_ssl_set.phpt @@ -12,7 +12,7 @@ if (!function_exists('mysqli_ssl_set')) ?> --FILE-- --FILE-- --FILE-- --CLEAN-- --EXPECTF-- [009] [%d] (error message varies with the MySQL Server version, check the error code) diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt index 6f6e011de101..ade578921202 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt @@ -4,13 +4,13 @@ mysqli_stmt_attr_get() mysqli --SKIPIF-- --FILE-- MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, @@ -50,7 +50,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt_attr_get(): Argument #2 ($attribute) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt index 320486f42db5..d125d5d1e891 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt @@ -4,12 +4,12 @@ mysqli_stmt_attr_get() - prefetch mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt index 0b17edf7a1ab..1fd00171189c 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt @@ -4,13 +4,13 @@ mysqli_stmt_attr_set() - mysqlnd does not check for invalid codes mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- Error: mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt b/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt index 04d0a3c0ebd7..e315c1226523 100644 --- a/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt +++ b/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt @@ -4,11 +4,11 @@ mysqli_stmt_prepare() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt b/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt index 03a980d929c6..cd39247b1cea 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_limits.phpt @@ -4,13 +4,13 @@ Bind limits mysqli --SKIPIF-- --CONFLICTS-- all --FILE-- --CLEAN-- --EXPECT-- Testing 273 columns with 240 rows... diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt index 009a089137e7..8d93dc9ceb9e 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt @@ -4,7 +4,7 @@ mysqli_stmt_bind_param() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- The number of variables must match the number of parameters in the prepared statement diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt index f23433dcd721..40296ad63d2d 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt @@ -4,12 +4,12 @@ mysqli_stmt_bind_param used with call_user_func_array() (see also bug #43568) mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- Regular, procedural, using variables diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt index f33076d64e14..b941edcfe5fd 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt @@ -4,11 +4,11 @@ mysqli_stmt_bind_param() - checking whether the parameters are modified (bug#443 mysqli --SKIPIF-- --FILE-- set_charset('latin1'); class foo { @@ -28,7 +28,7 @@ require_once('skipifconnectfailure.inc'); $stmt->execute(); $stmt->fetch(); $stmt->free_result(); - echo("$one\n\n"); + echo "$one\n\n"; // it is getting worse. Binding the same var twice with different // types you can get unexpected results e.g. binary trash for the @@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc'); $stmt->bind_result($one, $two); $stmt->fetch(); $stmt->free_result(); - echo("$one - $two\n\n"); + echo "$one - $two\n\n"; echo "Test 3:\n"; @@ -59,12 +59,12 @@ require_once('skipifconnectfailure.inc'); $stmt->execute(); $stmt->fetch(); $stmt->free_result(); - echo("$one - $two\n\n"); + echo "$one - $two\n\n"; echo "done!"; ?> --CLEAN-- --EXPECTF-- Test 1: diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt index 251bb546a31e..640690af4d25 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt @@ -4,7 +4,7 @@ mysqli_stmt_bind_param() - Binding with very high number of columns mysqli --SKIPIF-- --INI-- memory_limit=256M @@ -19,7 +19,7 @@ memory_limit=256M in this file and we test mysqli_stmt_bind_result() in the other test -- therefore the "duplicate" makes some sense to me. */ - require_once("connect.inc"); + require_once 'connect.inc'; if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", @@ -94,7 +94,7 @@ memory_limit=256M ?> --CLEAN-- --EXPECTF-- int(%d) diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt index 9c6a80a3a467..ac02db31d508 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt @@ -4,11 +4,11 @@ mysqli_stmt_bind_param() - playing with references mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt index e85a97a99443..887d557a078f 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt @@ -4,11 +4,11 @@ mysqli_stmt_bind_param() - binding variable twice mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt index 597b4f395a3c..31523599da3e 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt @@ -4,12 +4,12 @@ mysqli_stmt_bind_result() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt index 46a6f60da01e..8000336403a4 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt @@ -4,11 +4,11 @@ mysqli_stmt_bind_result() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_format.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_format.phpt index b40f414b39e4..a379359b45a8 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_format.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_format.phpt @@ -4,13 +4,13 @@ Playing with SELECT FORMAT(...) AS _format - see also bugs.php.net/42378 mysqli --SKIPIF-- --INI-- memory_limit=83886080 --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt index 138655ed2121..a7cef70a5308 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt @@ -4,11 +4,11 @@ mysqli_stmt_bind_result() - playing with references mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- plain vanilla... diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt index 1955290c2c5c..34b93ce0b3b2 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt @@ -4,12 +4,12 @@ mysqli_stmt_bind_result() - ZEROFILL mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_close.phpt b/ext/mysqli/tests/mysqli_stmt_close.phpt index 03788c0c0be2..cefaa22bc692 100644 --- a/ext/mysqli/tests/mysqli_stmt_close.phpt +++ b/ext/mysqli/tests/mysqli_stmt_close.phpt @@ -4,13 +4,13 @@ mysqli_stmt_close() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt index ba79b53ab5ba..6a03e1d9e75d 100644 --- a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt +++ b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt @@ -4,13 +4,13 @@ mysqli_stmt_data_seek() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt b/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt index 3ab05504bbef..e98824a65db3 100644 --- a/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt +++ b/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt @@ -4,11 +4,11 @@ Playing with datatype change between prepare and execute mysqli --SKIPIF-- --FILE-- --CLEAN-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is already closed diff --git a/ext/mysqli/tests/mysqli_stmt_error.phpt b/ext/mysqli/tests/mysqli_stmt_error.phpt index ce3b248622c2..fee614c67d5d 100644 --- a/ext/mysqli/tests/mysqli_stmt_error.phpt +++ b/ext/mysqli/tests/mysqli_stmt_error.phpt @@ -4,13 +4,13 @@ mysqli_stmt_error() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is already closed diff --git a/ext/mysqli/tests/mysqli_stmt_execute.phpt b/ext/mysqli/tests/mysqli_stmt_execute.phpt index 90de4a784337..2440b584376a 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute.phpt @@ -4,7 +4,7 @@ mysqli_stmt_execute() mysqli --SKIPIF-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_execute_bind.phpt b/ext/mysqli/tests/mysqli_stmt_execute_bind.phpt index 7921e51f75be..d382ad368362 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute_bind.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute_bind.phpt @@ -8,7 +8,7 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --CLEAN-- --EXPECT-- [001] mysqli_stmt::execute(): Argument #1 ($params) must consist of exactly 3 elements, 2 present diff --git a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt index 3af364dfb550..3d9795db4d6b 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt @@ -187,7 +187,7 @@ if (mysqli_get_server_version($link) <= 50000) { ?> --CLEAN-- --CLEAN-- --CLEAN-- --FILE-- --CLEAN-- --EXPECTF-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt b/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt index 1c49f2a198e7..325314f50035 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt @@ -69,7 +69,7 @@ if (mysqli_get_server_version($link) < 50003) { ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt b/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt index 574a20f40de6..48e2e6f8dec6 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt @@ -4,12 +4,12 @@ mysqli_stmt_fetch_fields() unicode, win32 mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- OK: 1 diff --git a/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt b/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt index 4055501c1152..9191df87ac7c 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt @@ -4,14 +4,14 @@ mysqli_stmt_fetch - geometry / spatial types mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_field_count.phpt b/ext/mysqli/tests/mysqli_stmt_field_count.phpt index ee3d4072289b..d667de2a1f68 100644 --- a/ext/mysqli/tests/mysqli_stmt_field_count.phpt +++ b/ext/mysqli/tests/mysqli_stmt_field_count.phpt @@ -4,13 +4,13 @@ mysqli_stmt_field_counts() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_free_result.phpt b/ext/mysqli/tests/mysqli_stmt_free_result.phpt index e14befed267f..fcf86c8a091e 100644 --- a/ext/mysqli/tests/mysqli_stmt_free_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_free_result.phpt @@ -4,7 +4,7 @@ mysqli_stmt_free_result() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_get_result.phpt b/ext/mysqli/tests/mysqli_stmt_get_result.phpt index d63ee6b8f0ab..d68f9b4d8e3a 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result.phpt @@ -4,7 +4,7 @@ mysqli_stmt_get_result() mysqli --SKIPIF-- --CLEAN-- --EXPECTF-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt index fc0deef2c824..1acd4e10aff8 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt @@ -4,7 +4,7 @@ mysqli_stmt_get_result() mysqli --SKIPIF-- @@ -15,9 +15,9 @@ if (!function_exists('mysqli_stmt_get_result')) mysqli_stmt_bind_result.phpt already. Restrict this test case to the basics. */ - require_once("connect.inc"); + require_once 'connect.inc'; - require('table.inc'); + require 'table.inc'; if (!$stmt = mysqli_stmt_init($link)) printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); @@ -142,7 +142,7 @@ if (!function_exists('mysqli_stmt_get_result')) ?> --CLEAN-- --EXPECT-- array(2) { diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt index c3a68db0797d..a6bd7c55bb46 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt @@ -127,7 +127,7 @@ if (mysqli_get_server_version($link) < 50003) { ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt index 0c60fc61bde6..0e58eb63665e 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt @@ -4,14 +4,14 @@ mysqli_stmt_get_result() - meta data, field_count() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- 2 2 diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt index 6eac7978a43f..b2fe144dd37d 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt @@ -4,7 +4,7 @@ mysqli_stmt_get_result - geometry / spatial types mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt index e1c2be6cee32..37afd39d15e4 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt @@ -4,14 +4,14 @@ mysqli_stmt_get_result() - meta data mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- array(2) { diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt index 9f4b01b93ae5..c50c99b9eac6 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt @@ -4,14 +4,14 @@ mysqli_stmt_get_result() - meta data, field info mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- object(stdClass)#%d (13) { diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt index d92177e7a300..b633f43d0cc4 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt @@ -4,7 +4,7 @@ mysqli_stmt_get_result() - SHOW, DESCRIBE, EXPLAIN mysqli --SKIPIF-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt index 65daea87137b..5ebdf7e0749f 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt @@ -4,14 +4,14 @@ mysqli_stmt_get_result() - seeking mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_result::data_seek(): Argument #1 ($offset) must be greater than or equal to 0 diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt index d1ac2080ebf8..dff2fa383c8d 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt @@ -4,14 +4,14 @@ mysqli_stmt_get_result - data types mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt index e372977844bb..86bd19da71ca 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt @@ -4,7 +4,7 @@ mysqli_stmt_get_warnings() - TODO mysqli --SKIPIF-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_init.phpt b/ext/mysqli/tests/mysqli_stmt_init.phpt index fca0cc522f63..ea45661e6de2 100644 --- a/ext/mysqli/tests/mysqli_stmt_init.phpt +++ b/ext/mysqli/tests/mysqli_stmt_init.phpt @@ -4,7 +4,7 @@ mysqli_stmt_init() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt index 61a1aeadb45b..2fe2edd9c560 100644 --- a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt @@ -4,13 +4,13 @@ mysqli_stmt_insert_id() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_multires.phpt b/ext/mysqli/tests/mysqli_stmt_multires.phpt index 9d883ff3410e..0352a464e86f 100644 --- a/ext/mysqli/tests/mysqli_stmt_multires.phpt +++ b/ext/mysqli/tests/mysqli_stmt_multires.phpt @@ -4,7 +4,7 @@ Multiple result set with PS mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- run_tests.php don't fool me with your 'ungreedy' expression '.+?'! diff --git a/ext/mysqli/tests/mysqli_stmt_param_count.phpt b/ext/mysqli/tests/mysqli_stmt_param_count.phpt index e1f4c3424926..9152aa231eec 100644 --- a/ext/mysqli/tests/mysqli_stmt_param_count.phpt +++ b/ext/mysqli/tests/mysqli_stmt_param_count.phpt @@ -4,13 +4,13 @@ mysqli_stmt_param_count() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_prepare.phpt b/ext/mysqli/tests/mysqli_stmt_prepare.phpt index b3f4e69eb9b1..733fe9e1b3be 100644 --- a/ext/mysqli/tests/mysqli_stmt_prepare.phpt +++ b/ext/mysqli/tests/mysqli_stmt_prepare.phpt @@ -4,11 +4,11 @@ mysqli_stmt_prepare() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is already closed diff --git a/ext/mysqli/tests/mysqli_stmt_reset.phpt b/ext/mysqli/tests/mysqli_stmt_reset.phpt index 38b57e17b495..0d31a56fcf92 100644 --- a/ext/mysqli/tests/mysqli_stmt_reset.phpt +++ b/ext/mysqli/tests/mysqli_stmt_reset.phpt @@ -4,11 +4,11 @@ mysqli_stmt_reset() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt index 0eb0f7822108..81797c98e09b 100644 --- a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt +++ b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt @@ -4,13 +4,13 @@ mysqli_stmt_result_metadata() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt index 5eac0ba5d20b..2fade6aabf17 100644 --- a/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt +++ b/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt @@ -4,13 +4,13 @@ mysqli_stmt_result_metadata() - non SELECT statements mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt index 048d6f0fd9b6..6875e42e792c 100644 --- a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt +++ b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt @@ -4,13 +4,13 @@ mysqli_stmt_send_long_data() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt_send_long_data(): Argument #2 ($param_num) must be greater than or equal to 0 diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt index eafdfd434b8d..5c7ffd9c6da4 100644 --- a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt +++ b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt @@ -4,11 +4,11 @@ mysqli_stmt_send_long_data() - exceed packet size, mysqlnd mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt index 34a6c28b12fa..d82201134a2c 100644 --- a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt +++ b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt @@ -4,13 +4,13 @@ mysqli_stmt_sqlstate() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_store_result.phpt b/ext/mysqli/tests/mysqli_stmt_store_result.phpt index 10df777b9fac..cd16c0a20ebd 100644 --- a/ext/mysqli/tests/mysqli_stmt_store_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_store_result.phpt @@ -4,13 +4,13 @@ mysqli_stmt_store_result() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt index 0db0f0a2baf8..29658bb25c66 100644 --- a/ext/mysqli/tests/mysqli_stmt_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_stmt_unclonable.phpt @@ -4,11 +4,11 @@ Trying to clone mysqli_stmt object mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt b/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt index 2c38f2159add..9315e706dd9a 100644 --- a/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt +++ b/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt @@ -4,20 +4,20 @@ mysqli_store_result() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_store_result_copy.phpt b/ext/mysqli/tests/mysqli_store_result_copy.phpt index d48701caca11..ffa335e0937f 100644 --- a/ext/mysqli/tests/mysqli_store_result_copy.phpt +++ b/ext/mysqli/tests/mysqli_store_result_copy.phpt @@ -4,7 +4,7 @@ mysqli_store_result() mysqli --SKIPIF-- --INI-- mysqlnd.debug="d:t:O,{TMP}/mysqlnd.trace" @@ -13,12 +13,12 @@ mysqlnd.mempool_default_size=1 mysqlnd.fetch_data_copy=0 --FILE-- --CLEAN-- --EXPECTF-- array(2) { diff --git a/ext/mysqli/tests/mysqli_thread_id.phpt b/ext/mysqli/tests/mysqli_thread_id.phpt index 9862fadaa9cc..4f0ffc0658bb 100644 --- a/ext/mysqli/tests/mysqli_thread_id.phpt +++ b/ext/mysqli/tests/mysqli_thread_id.phpt @@ -4,13 +4,13 @@ mysqli_thread_id() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_unclonable.phpt b/ext/mysqli/tests/mysqli_unclonable.phpt index d1686888c1f5..0772854ed96a 100644 --- a/ext/mysqli/tests/mysqli_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_unclonable.phpt @@ -4,11 +4,11 @@ Trying to clone mysqli object mysqli --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- mysqli_data_seek() cannot be used in MYSQLI_USE_RESULT mode diff --git a/ext/mysqli/tests/mysqli_warning_count.phpt b/ext/mysqli/tests/mysqli_warning_count.phpt index 0babf59593f4..6ae11434dfa9 100644 --- a/ext/mysqli/tests/mysqli_warning_count.phpt +++ b/ext/mysqli/tests/mysqli_warning_count.phpt @@ -4,13 +4,13 @@ mysqli_warning_count() mysqli --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_warning_unclonable.phpt b/ext/mysqli/tests/mysqli_warning_unclonable.phpt index 460334024b3e..c51747b51449 100644 --- a/ext/mysqli/tests/mysqli_warning_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_warning_unclonable.phpt @@ -10,7 +10,7 @@ if (!$TEST_EXPERIMENTAL) ?> --FILE-- --CLEAN-- --EXPECTF-- Fatal error: Trying to clone an uncloneable object of class mysqli_warning in %s on line %d diff --git a/ext/mysqli/tests/ps_cursor_multiple_result_sets.phpt b/ext/mysqli/tests/ps_cursor_multiple_result_sets.phpt index d6956b7e6355..7b706ac434d3 100644 --- a/ext/mysqli/tests/ps_cursor_multiple_result_sets.phpt +++ b/ext/mysqli/tests/ps_cursor_multiple_result_sets.phpt @@ -4,11 +4,11 @@ PS using cursor and returning multiple result sets mysqli --SKIPIF-- --FILE-- Date: Tue, 1 Aug 2023 00:40:55 +0100 Subject: [PATCH 039/120] Remove unnecessary parentheses around language constructs in mysqli --- ext/mysqli/tests/004.phpt | 2 +- ext/mysqli/tests/bug33090.phpt | 2 +- ext/mysqli/tests/bug34785.phpt | 2 +- ext/mysqli/tests/bug46614.phpt | 2 +- ext/mysqli/tests/bug47050.phpt | 2 +- ext/mysqli/tests/bug49027.phpt | 2 +- ext/mysqli/tests/bug51605.phpt | 2 +- ext/mysqli/tests/bug54221.phpt | 2 +- ext/mysqli/tests/bug54674.phpt | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ext/mysqli/tests/004.phpt b/ext/mysqli/tests/004.phpt index 92924f14df80..09eff4a1ecfd 100644 --- a/ext/mysqli/tests/004.phpt +++ b/ext/mysqli/tests/004.phpt @@ -8,7 +8,7 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- --FILE-- isEmpty(); diff --git a/ext/mysqli/tests/bug47050.phpt b/ext/mysqli/tests/bug47050.phpt index 0f23b9ff8066..35a3a23c9f09 100644 --- a/ext/mysqli/tests/bug47050.phpt +++ b/ext/mysqli/tests/bug47050.phpt @@ -11,7 +11,7 @@ if (!defined("MYSQLI_ASYNC")) { ?> --FILE-- --FILE-- Date: Tue, 1 Aug 2023 00:50:01 +0100 Subject: [PATCH 040/120] As of 8.2 this SKIP is no longer possible --- ext/mysqli/tests/065.phpt | 4 ---- ext/mysqli/tests/bug37090.phpt | 3 --- ext/mysqli/tests/mysqli_character_set.phpt | 4 ---- ext/mysqli/tests/mysqli_get_charset.phpt | 2 -- ext/mysqli/tests/mysqli_set_charset.phpt | 3 --- 5 files changed, 16 deletions(-) diff --git a/ext/mysqli/tests/065.phpt b/ext/mysqli/tests/065.phpt index c0a7b2c0cade..d1c2a813dc89 100644 --- a/ext/mysqli/tests/065.phpt +++ b/ext/mysqli/tests/065.phpt @@ -5,10 +5,6 @@ mysqli --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- Date: Mon, 31 Jul 2023 22:23:15 +0200 Subject: [PATCH 041/120] Disable global state test on Windows It looks like the config.w32 uses CHECK_HEADER_ADD_INCLUDE to add the include path to libxml into the search path. That doesn't happen in zend-test. To add to the Windows trouble, libxml is statically linked in, ext/libxml can only be built statically but ext/zend-test can be built both statically and dynamically. So the regression tests won't work in all possible configurations anyway on Windows. All of this is no problem on Linux because it just uses dynamic linking and pkg-config, without any magic. Signed-off-by: Ben Ramsey --- .../tests/libxml_global_state_entity_loader_bypass.phpt | 1 + .../tests/libxml_global_state_entity_loader_bypass.phpt | 1 + .../tests/libxml_global_state_entity_loader_bypass.phpt | 1 + ext/zend_test/test.c | 4 +++- ext/zend_test/test.stub.php | 2 +- ext/zend_test/test_arginfo.h | 8 ++++---- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt b/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt index b28afd4694eb..7fc2a249ac77 100644 --- a/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt +++ b/ext/dom/tests/libxml_global_state_entity_loader_bypass.phpt @@ -5,6 +5,7 @@ GHSA-3qrf-m4j2-pcrr (libxml global state entity loader bypass) if (!extension_loaded('libxml')) die('skip libxml extension not available'); if (!extension_loaded('dom')) die('skip dom extension not available'); if (!extension_loaded('zend-test')) die('skip zend-test extension not available'); +if (!function_exists('zend_test_override_libxml_global_state')) die('skip not for Windows'); ?> --FILE-- --FILE-- --FILE-- # include #endif @@ -275,6 +275,7 @@ static ZEND_FUNCTION(zend_get_current_func_name) RETURN_STR(function_name); } +#if defined(HAVE_LIBXML) && !defined(PHP_WIN32) static ZEND_FUNCTION(zend_test_override_libxml_global_state) { ZEND_PARSE_PARAMETERS_NONE(); @@ -286,6 +287,7 @@ static ZEND_FUNCTION(zend_test_override_libxml_global_state) (void) xmlLineNumbersDefault(1); (void) xmlKeepBlanksDefault(0); } +#endif /* TESTS Z_PARAM_ITERABLE and Z_PARAM_ITERABLE_OR_NULL */ static ZEND_FUNCTION(zend_iterable) diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index fe917dbc8dd9..ddb7a291dde2 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -68,7 +68,7 @@ function zend_weakmap_dump(): array {} function zend_get_current_func_name(): string {} -#ifdef HAVE_LIBXML +#if defined(HAVE_LIBXML) && !defined(PHP_WIN32) function zend_test_override_libxml_global_state(): void {} #endif diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 73a844583932..c16035b147b4 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 8cfd05fb9f7524837d23f92b185fcd30f964521f */ + * Stub hash: eb79a01021e58731bfbefab320569fbb0997276a */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -65,7 +65,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_get_current_func_name, 0, 0, IS_STRING, 0) ZEND_END_ARG_INFO() -#if defined(HAVE_LIBXML) +#if defined(HAVE_LIBXML) && !defined(PHP_WIN32) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_override_libxml_global_state, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() #endif @@ -106,7 +106,7 @@ static ZEND_FUNCTION(zend_weakmap_attach); static ZEND_FUNCTION(zend_weakmap_remove); static ZEND_FUNCTION(zend_weakmap_dump); static ZEND_FUNCTION(zend_get_current_func_name); -#if defined(HAVE_LIBXML) +#if defined(HAVE_LIBXML) && !defined(PHP_WIN32) static ZEND_FUNCTION(zend_test_override_libxml_global_state); #endif static ZEND_FUNCTION(namespaced_func); @@ -136,7 +136,7 @@ static const zend_function_entry ext_functions[] = { ZEND_FE(zend_weakmap_remove, arginfo_zend_weakmap_remove) ZEND_FE(zend_weakmap_dump, arginfo_zend_weakmap_dump) ZEND_FE(zend_get_current_func_name, arginfo_zend_get_current_func_name) -#if defined(HAVE_LIBXML) +#if defined(HAVE_LIBXML) && !defined(PHP_WIN32) ZEND_FE(zend_test_override_libxml_global_state, arginfo_zend_test_override_libxml_global_state) #endif ZEND_NS_FE("ZendTestNS2\\ZendSubNS", namespaced_func, arginfo_ZendTestNS2_ZendSubNS_namespaced_func) From d8f2584ebb9727b83cbe1a2eb1c3363c4a42f5ac Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 31 Jul 2023 23:00:57 +0200 Subject: [PATCH 042/120] NEWS Signed-off-by: Ben Ramsey --- NEWS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 00ea5c7dd89d..1f694ae6e615 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,13 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.0.30 +- Libxml: + . Fixed bug GHSA-3qrf-m4j2-pcrr (Security issue with external entity loading + in XML without enabling it). (CVE-2023-3823) (nielsdos, ilutov) + +- Phar: + . Fixed bug GHSA-jqcx-ccgc-xwhv (Buffer mismanagement in phar_dir_read()). + (CVE-2023-3824) (nielsdos) 08 Jun 2023, PHP 8.0.29 From e61dbe54e91428a03edf6a27a1ba200d3022d8a2 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 1 Aug 2023 11:41:13 +0200 Subject: [PATCH 043/120] Fix zend/test arginfo stub hash --- ext/zend_test/test_arginfo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index f72525961958..a8b84cbdeea6 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 47eb58d644268f4fdce7a6b5007f7755ebfcb197 */ + * Stub hash: 7effabe18579113dbfc4c61231d93c8c262d959a */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() From 98768cf430e818512591047050acf9c177ded481 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Tue, 1 Aug 2023 12:36:49 +0100 Subject: [PATCH 044/120] Update NEWS for PHP 8.3.0beta2 --- NEWS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 00c83dffccdc..3f38dedf9cbe 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.3.0beta2 +?? ??? ????, PHP 8.3.0beta3 + + +03 Aug 2023, PHP 8.3.0beta2 - Bcmath . Fixed GH-11761 (removing trailing zeros from numbers) (jorgsowa) From 4553258df3f440fe97819413f1870deff9bb85ee Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 1 Aug 2023 16:01:11 +0300 Subject: [PATCH 045/120] Fixed incorrect tracked malloc deallocation Fixes ext/ffi/tests/list.phpt failure --- Zend/zend_alloc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index ae22be434fb1..7fd41f3b1ab9 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -2412,6 +2412,13 @@ ZEND_API bool is_zend_ptr(const void *ptr) { #if ZEND_MM_CUSTOM if (AG(mm_heap)->use_custom_heap) { + if (AG(mm_heap)->custom_heap.std._malloc == tracked_malloc) { + zend_ulong h = ((uintptr_t) ptr) >> ZEND_MM_ALIGNMENT_LOG2; + zval *size_zv = zend_hash_index_find(AG(mm_heap)->tracked_allocs, h); + if (size_zv) { + return 1; + } + } return 0; } #endif From e0bee2cc8a74a15cd503d48ad1c82e6c018f1fe3 Mon Sep 17 00:00:00 2001 From: Juliette <663378+jrfnl@users.noreply.github.com> Date: Tue, 1 Aug 2023 16:22:29 +0200 Subject: [PATCH 046/120] [ci skip] PHP 8.3 Upgrading: move two entries to the right section (#11846) These were both listed under "Backward Incompatible Changes", while, as far as I can see, these are "New Features". Co-authored-by: jrfnl --- UPGRADING | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/UPGRADING b/UPGRADING index 79edf41a959e..7a9113a74f13 100644 --- a/UPGRADING +++ b/UPGRADING @@ -24,8 +24,6 @@ PHP 8.3 UPGRADE NOTES Error when using more than `zend.max_allowed_stack_size-zend.reserved_stack_size` bytes of stack (`fiber.stack_size-zend.reserved_stack_size` for fibers). - . Class constants can now be accessed dynamically using the C::{$name} syntax. - RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch . Executing proc_get_status() multiple times will now always return the right value on posix systems. Previously, only the first call of the function returned the right value. Executing proc_close() after proc_get_status() will @@ -41,8 +39,6 @@ PHP 8.3 UPGRADE NOTES property to the class directly without traits. . Assigning a negative index n to an empty array will now make sure that the next index is n+1 instead of 0. - . Static variable initializers can now contain arbitrary expressions. - RFC: https://wiki.php.net/rfc/arbitrary_static_variable_initializers . Class constant visibility variance is now correctly checked when inherited from interfaces. . WeakMaps entries whose key maps to itself (possibly transitively) may now be @@ -95,6 +91,10 @@ PHP 8.3 UPGRADE NOTES . Added the #[\Override] attribute to check that a method exists in a parent class or implemented interface. RFC: https://wiki.php.net/rfc/marking_overriden_methods + . Class constants can now be accessed dynamically using the C::{$name} syntax. + RFC: https://wiki.php.net/rfc/dynamic_class_constant_fetch + . Static variable initializers can now contain arbitrary expressions. + RFC: https://wiki.php.net/rfc/arbitrary_static_variable_initializers - CLI . It is now possible to lint multiple files. From 04c820fd16a752efea1d9f8f2a40825c7dd323fc Mon Sep 17 00:00:00 2001 From: Juliette <663378+jrfnl@users.noreply.github.com> Date: Tue, 1 Aug 2023 16:54:09 +0200 Subject: [PATCH 047/120] [ci skip] PHP 8.3 Upgrading: fix assert_options() typo + minor grammar tweaks (#11845) Co-authored-by: jrfnl --- UPGRADING | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UPGRADING b/UPGRADING index 7a9113a74f13..1bc576d007ce 100644 --- a/UPGRADING +++ b/UPGRADING @@ -160,8 +160,8 @@ PHP 8.3 UPGRADE NOTES RFC: https://wiki.php.net/rfc/deprecations_php_8_3#mt_rand_php - Standard: - . The assert_option() function is now deprecated. - . The ASSERT_ACTIVE, ASSERT_BAIL,ASSERT_CALLBACK, ASSERT_EXCEPTION, and + . The assert_options() function is now deprecated. + . The ASSERT_ACTIVE, ASSERT_BAIL, ASSERT_CALLBACK, ASSERT_EXCEPTION, and ASSERT_WARNING constants have been deprecated. RFC: https://wiki.php.net/rfc/assert-string-eval-cleanup From 6e468bbd3b99f47862b031cc353410bdfac44203 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 31 Jul 2023 17:57:53 +0200 Subject: [PATCH 048/120] Fix json_encode result on DOMDocument According to https://www.php.net/manual/en/class.domdocument: When using json_encode() on a DOMDocument object the result will be that of encoding an empty object. But this was broken in 8.1. The output was `{"config": null}`. That's because the config property is defined with a default value of NULL, hence it was included. The other properties are not included because they don't have a default property, and nothing is ever written to their backing field. Hence, the JSON encoder excludes them. Similarly, `(array) $doc` would yield the same `config` key in the array. Closes GH-11840. --- NEWS | 1 + ext/dom/php_dom.stub.php | 2 +- ext/dom/php_dom_arginfo.h | 4 ++-- ext/dom/tests/DOMDocument_json_encode.phpt | 11 +++++++++++ ext/dom/tests/domobject_debug_handler.phpt | 4 ++-- 5 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 ext/dom/tests/DOMDocument_json_encode.phpt diff --git a/NEWS b/NEWS index 021e45a5059e..6ff509df6030 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,7 @@ PHP NEWS . Fix empty argument cases for DOMParentNode methods. (nielsdos) . Fixed bug GH-11791 (Wrong default value of DOMDocument::xmlStandalone). (nielsdos) + . Fix json_encode result on DOMDocument. (nielsdos) - FFI: . Fix leaking definitions when using FFI::cdef()->new(...). (ilutov) diff --git a/ext/dom/php_dom.stub.php b/ext/dom/php_dom.stub.php index 45b54c21d6c2..bbf7bad0f149 100644 --- a/ext/dom/php_dom.stub.php +++ b/ext/dom/php_dom.stub.php @@ -433,7 +433,7 @@ class DOMDocument extends DOMNode implements DOMParentNode * @readonly * @deprecated */ - public mixed $config = null; + public mixed $config; public bool $formatOutput; diff --git a/ext/dom/php_dom_arginfo.h b/ext/dom/php_dom_arginfo.h index d63b43e9b95f..1be65cb75d16 100644 --- a/ext/dom/php_dom_arginfo.h +++ b/ext/dom/php_dom_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: a62e383b05df81ea245a7993215fb8ff4e1c7f9d */ + * Stub hash: 20a0ff883af3bbf073d9c8bc8246646ffafe7818 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_dom_import_simplexml, 0, 1, DOMElement, 0) ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0) @@ -1436,7 +1436,7 @@ static zend_class_entry *register_class_DOMDocument(zend_class_entry *class_entr zend_string_release(property_documentURI_name); zval property_config_default_value; - ZVAL_NULL(&property_config_default_value); + ZVAL_UNDEF(&property_config_default_value); zend_string *property_config_name = zend_string_init("config", sizeof("config") - 1, 1); zend_declare_typed_property(class_entry, property_config_name, &property_config_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY)); zend_string_release(property_config_name); diff --git a/ext/dom/tests/DOMDocument_json_encode.phpt b/ext/dom/tests/DOMDocument_json_encode.phpt new file mode 100644 index 000000000000..ed85ab4f2109 --- /dev/null +++ b/ext/dom/tests/DOMDocument_json_encode.phpt @@ -0,0 +1,11 @@ +--TEST-- +JSON encoding a DOMDocument +--EXTENSIONS-- +dom +--FILE-- + +--EXPECT-- +{} diff --git a/ext/dom/tests/domobject_debug_handler.phpt b/ext/dom/tests/domobject_debug_handler.phpt index 948fd547f4d5..97eb5fd9bba5 100644 --- a/ext/dom/tests/domobject_debug_handler.phpt +++ b/ext/dom/tests/domobject_debug_handler.phpt @@ -16,8 +16,6 @@ var_dump($d); ?> --EXPECTF-- object(DOMDocument)#1 (39) { - ["config"]=> - NULL ["dynamicProperty"]=> object(stdClass)#2 (0) { } @@ -45,6 +43,8 @@ object(DOMDocument)#1 (39) { bool(true) ["documentURI"]=> string(%d) %s + ["config"]=> + NULL ["formatOutput"]=> bool(false) ["validateOnParse"]=> From 6ae9cf40d11eb31562246fbcac7cc73cdc8a2278 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 21 Jul 2023 18:08:58 +0100 Subject: [PATCH 049/120] Fix OSS-fuzz #60709 unseting op via globals It turns out not just NULL is affected nor -- but also on booleans and this also affects properties --- .../in-de-crement/oss-fuzz-60709_globals.phpt | 36 +++++ .../unset_globals_in_error_handler.phpt | 130 ++++++++++++++++ ...nset_object_property_in_error_handler.phpt | 143 ++++++++++++++++++ Zend/zend_operators.c | 27 +++- 4 files changed, 333 insertions(+), 3 deletions(-) create mode 100644 Zend/tests/in-de-crement/oss-fuzz-60709_globals.phpt create mode 100644 Zend/tests/in-de-crement/unset_globals_in_error_handler.phpt create mode 100644 Zend/tests/in-de-crement/unset_object_property_in_error_handler.phpt diff --git a/Zend/tests/in-de-crement/oss-fuzz-60709_globals.phpt b/Zend/tests/in-de-crement/oss-fuzz-60709_globals.phpt new file mode 100644 index 000000000000..d6405a28f966 --- /dev/null +++ b/Zend/tests/in-de-crement/oss-fuzz-60709_globals.phpt @@ -0,0 +1,36 @@ +--TEST-- +oss-fuzz #60709: Test +--FILE-- + +--EXPECT-- +POST DEC +Undefined variable $x +Decrement on type null has no effect, this will change in the next major version of PHP +NULL +POST INC +Undefined variable $x +NULL +PRE DEC +Undefined variable $x +Decrement on type null has no effect, this will change in the next major version of PHP +NULL +PRE INC +Undefined variable $x +int(1) diff --git a/Zend/tests/in-de-crement/unset_globals_in_error_handler.phpt b/Zend/tests/in-de-crement/unset_globals_in_error_handler.phpt new file mode 100644 index 000000000000..d2f27ed32324 --- /dev/null +++ b/Zend/tests/in-de-crement/unset_globals_in_error_handler.phpt @@ -0,0 +1,130 @@ +--TEST-- +Unset variable via $GLOBALS array in error_handler +--FILE-- + +--EXPECT-- +NULL (only --) +POST DEC +Decrement on type null has no effect, this will change in the next major version of PHP +NULL +PRE DEC +Decrement on type null has no effect, this will change in the next major version of PHP +NULL +Empty string +POST INC +Increment on non-alphanumeric string is deprecated +string(0) "" +POST DEC +Decrement on empty string is deprecated as non-numeric +string(0) "" +PRE INC +Increment on non-alphanumeric string is deprecated +string(1) "1" +PRE DEC +Decrement on empty string is deprecated as non-numeric +int(-1) +Non fill ASCII (only ++) +POST INC +Increment on non-alphanumeric string is deprecated +string(4) " ad " +PRE INC +Increment on non-alphanumeric string is deprecated +string(4) " ad " +Bool +POST INC +Increment on type bool has no effect, this will change in the next major version of PHP +bool(false) +POST DEC +Decrement on type bool has no effect, this will change in the next major version of PHP +bool(false) +PRE INC +Increment on type bool has no effect, this will change in the next major version of PHP +bool(false) +PRE DEC +Decrement on type bool has no effect, this will change in the next major version of PHP +bool(false) +POST INC +Increment on type bool has no effect, this will change in the next major version of PHP +bool(true) +POST DEC +Decrement on type bool has no effect, this will change in the next major version of PHP +bool(true) +PRE INC +Increment on type bool has no effect, this will change in the next major version of PHP +bool(true) +PRE DEC +Decrement on type bool has no effect, this will change in the next major version of PHP +bool(true) diff --git a/Zend/tests/in-de-crement/unset_object_property_in_error_handler.phpt b/Zend/tests/in-de-crement/unset_object_property_in_error_handler.phpt new file mode 100644 index 000000000000..33d18b9a6279 --- /dev/null +++ b/Zend/tests/in-de-crement/unset_object_property_in_error_handler.phpt @@ -0,0 +1,143 @@ +--TEST-- +Unset property via error_handler +--FILE-- +a); + } +} + +$c = new C; +set_error_handler([$c, 'errorHandler']); + +/* default property value */ +var_dump(--$c->a); + +echo "NULL (only --)\n"; +echo "POST DEC\n"; +$c->a = null; +var_dump($c->a--); +unset($c->a); +echo "PRE DEC\n"; +$c->a = null; +var_dump(--$c->a); +unset($c->a); +echo "Empty string\n"; +echo "POST INC\n"; +$c->a = ""; +var_dump($c->a++); +unset($c->a); +echo "POST DEC\n"; +$c->a = ""; +var_dump($c->a--); +unset($c->a); +echo "PRE INC\n"; +$c->a = ""; +var_dump(++$c->a); +unset($c->a); +echo "PRE DEC\n"; +$c->a = ""; +var_dump(--$c->a); +unset($c->a); +echo "Non fill ASCII (only ++)\n"; +echo "POST INC\n"; +$c->a = " ad "; +var_dump($c->a++); +unset($c->a); +echo "PRE INC\n"; +$c->a = " ad "; +var_dump(++$c->a); +unset($c->a); +echo "Bool\n"; +echo "POST INC\n"; +$c->a = false; +var_dump($c->a++); +unset($c->a); +echo "POST DEC\n"; +$c->a = false; +var_dump($c->a--); +unset($c->a); +echo "PRE INC\n"; +$c->a = false; +var_dump(++$c->a); +unset($c->a); +echo "PRE DEC\n"; +$c->a = false; +var_dump(--$c->a); +unset($c->a); +echo "POST INC\n"; +$c->a = true; +var_dump($c->a++); +unset($c->a); +echo "POST DEC\n"; +$c->a = true; +var_dump($c->a--); +unset($c->a); +echo "PRE INC\n"; +$c->a = true; +var_dump(++$c->a); +unset($c->a); +echo "PRE DEC\n"; +$c->a = true; +var_dump(--$c->a); +unset($c->a); +?> +--EXPECT-- +string(87) "Decrement on type null has no effect, this will change in the next major version of PHP" +NULL +NULL (only --) +POST DEC +string(87) "Decrement on type null has no effect, this will change in the next major version of PHP" +NULL +PRE DEC +string(87) "Decrement on type null has no effect, this will change in the next major version of PHP" +NULL +Empty string +POST INC +string(50) "Increment on non-alphanumeric string is deprecated" +string(0) "" +POST DEC +string(54) "Decrement on empty string is deprecated as non-numeric" +string(0) "" +PRE INC +string(50) "Increment on non-alphanumeric string is deprecated" +string(1) "1" +PRE DEC +string(54) "Decrement on empty string is deprecated as non-numeric" +int(-1) +Non fill ASCII (only ++) +POST INC +string(50) "Increment on non-alphanumeric string is deprecated" +string(4) " ad " +PRE INC +string(50) "Increment on non-alphanumeric string is deprecated" +string(4) " ad " +Bool +POST INC +string(87) "Increment on type bool has no effect, this will change in the next major version of PHP" +bool(false) +POST DEC +string(87) "Decrement on type bool has no effect, this will change in the next major version of PHP" +bool(false) +PRE INC +string(87) "Increment on type bool has no effect, this will change in the next major version of PHP" +bool(false) +PRE DEC +string(87) "Decrement on type bool has no effect, this will change in the next major version of PHP" +bool(false) +POST INC +string(87) "Increment on type bool has no effect, this will change in the next major version of PHP" +bool(true) +POST DEC +string(87) "Decrement on type bool has no effect, this will change in the next major version of PHP" +bool(true) +PRE INC +string(87) "Increment on type bool has no effect, this will change in the next major version of PHP" +bool(true) +PRE DEC +string(87) "Decrement on type bool has no effect, this will change in the next major version of PHP" +bool(true) diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 293d7cc029ea..7f1b3234acea 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2657,9 +2657,18 @@ ZEND_API zend_result ZEND_FASTCALL increment_function(zval *op1) /* {{{ */ } break; case IS_FALSE: - case IS_TRUE: + case IS_TRUE: { + /* Error handler can undef/change type of op1, save it and reset it in case those cases */ + zval copy; + ZVAL_COPY_VALUE(©, op1); zend_error(E_WARNING, "Increment on type bool has no effect, this will change in the next major version of PHP"); + zval_ptr_dtor(op1); + ZVAL_COPY_VALUE(op1, ©); + if (EG(exception)) { + return FAILURE; + } break; + } case IS_REFERENCE: op1 = Z_REFVAL_P(op1); goto try_again; @@ -2735,19 +2744,31 @@ ZEND_API zend_result ZEND_FASTCALL decrement_function(zval *op1) /* {{{ */ } } break; - case IS_NULL: + case IS_NULL: { + /* Error handler can undef/change type of op1, save it and reset it in case those cases */ + zval copy; + ZVAL_COPY_VALUE(©, op1); zend_error(E_WARNING, "Decrement on type null has no effect, this will change in the next major version of PHP"); + zval_ptr_dtor(op1); + ZVAL_COPY_VALUE(op1, ©); if (EG(exception)) { return FAILURE; } break; + } case IS_FALSE: - case IS_TRUE: + case IS_TRUE: { + /* Error handler can undef/change type of op1, save it and reset it in case those cases */ + zval copy; + ZVAL_COPY_VALUE(©, op1); zend_error(E_WARNING, "Decrement on type bool has no effect, this will change in the next major version of PHP"); + zval_ptr_dtor(op1); + ZVAL_COPY_VALUE(op1, ©); if (EG(exception)) { return FAILURE; } break; + } case IS_REFERENCE: op1 = Z_REFVAL_P(op1); goto try_again; From 2fbec0974fd6ec89555f37356a8376f680b9bf49 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Mon, 24 Jul 2023 16:15:57 +0100 Subject: [PATCH 050/120] Fix OSS Fuzz #60734: use-after-free visible in ASAN build --- .../in-de-crement/object_cannot_incdec.phpt | 45 +++++++++++++++++++ .../object_cannot_incdec_use_result_op.phpt | 45 +++++++++++++++++++ .../oss-fuzz-60734_predec-object.phpt | 14 ++++++ .../oss-fuzz-60734_preinc-object.phpt | 14 ++++++ Zend/zend_vm_def.h | 8 ++++ Zend/zend_vm_execute.h | 16 +++++++ 6 files changed, 142 insertions(+) create mode 100644 Zend/tests/in-de-crement/object_cannot_incdec.phpt create mode 100644 Zend/tests/in-de-crement/object_cannot_incdec_use_result_op.phpt create mode 100644 Zend/tests/in-de-crement/oss-fuzz-60734_predec-object.phpt create mode 100644 Zend/tests/in-de-crement/oss-fuzz-60734_preinc-object.phpt diff --git a/Zend/tests/in-de-crement/object_cannot_incdec.phpt b/Zend/tests/in-de-crement/object_cannot_incdec.phpt new file mode 100644 index 000000000000..39a41d61dd3e --- /dev/null +++ b/Zend/tests/in-de-crement/object_cannot_incdec.phpt @@ -0,0 +1,45 @@ +--TEST-- +Cannot increment/decrement objects +--FILE-- +getMessage(), PHP_EOL; + var_dump($o); +} +try { + $o--; +} catch (\TypeError $e) { + echo $e->getMessage(), PHP_EOL; + var_dump($o); +} +try { + ++$o; +} catch (\TypeError $e) { + echo $e->getMessage(), PHP_EOL; + var_dump($o); +} +try { + --$o; +} catch (\TypeError $e) { + echo $e->getMessage(), PHP_EOL; + var_dump($o); +} +?> +--EXPECT-- +Cannot increment Foo +object(Foo)#1 (0) { +} +Cannot decrement Foo +object(Foo)#1 (0) { +} +Cannot increment Foo +object(Foo)#1 (0) { +} +Cannot decrement Foo +object(Foo)#1 (0) { +} diff --git a/Zend/tests/in-de-crement/object_cannot_incdec_use_result_op.phpt b/Zend/tests/in-de-crement/object_cannot_incdec_use_result_op.phpt new file mode 100644 index 000000000000..b4c193a67182 --- /dev/null +++ b/Zend/tests/in-de-crement/object_cannot_incdec_use_result_op.phpt @@ -0,0 +1,45 @@ +--TEST-- +Cannot increment/decrement objects +--FILE-- +getMessage(), PHP_EOL; + var_dump($o); +} +try { + $y = $o--; +} catch (\TypeError $e) { + echo $e->getMessage(), PHP_EOL; + var_dump($o); +} +try { + $y = ++$o; +} catch (\TypeError $e) { + echo $e->getMessage(), PHP_EOL; + var_dump($o); +} +try { + $y = --$o; +} catch (\TypeError $e) { + echo $e->getMessage(), PHP_EOL; + var_dump($o); +} +?> +--EXPECT-- +Cannot increment Foo +object(Foo)#1 (0) { +} +Cannot decrement Foo +object(Foo)#1 (0) { +} +Cannot increment Foo +object(Foo)#1 (0) { +} +Cannot decrement Foo +object(Foo)#1 (0) { +} diff --git a/Zend/tests/in-de-crement/oss-fuzz-60734_predec-object.phpt b/Zend/tests/in-de-crement/oss-fuzz-60734_predec-object.phpt new file mode 100644 index 000000000000..0f0e19c8c2d5 --- /dev/null +++ b/Zend/tests/in-de-crement/oss-fuzz-60734_predec-object.phpt @@ -0,0 +1,14 @@ +--TEST-- +OSS Fuzz #60734: use-after-free visible in ASAN build pre decrement. +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught TypeError: Cannot decrement Foo in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/tests/in-de-crement/oss-fuzz-60734_preinc-object.phpt b/Zend/tests/in-de-crement/oss-fuzz-60734_preinc-object.phpt new file mode 100644 index 000000000000..3bae551f04f4 --- /dev/null +++ b/Zend/tests/in-de-crement/oss-fuzz-60734_preinc-object.phpt @@ -0,0 +1,14 @@ +--TEST-- +OSS Fuzz #60734: use-after-free visible in ASAN build pre increment. +--FILE-- + +--EXPECTF-- +Fatal error: Uncaught TypeError: Cannot increment Foo in %s:%d +Stack trace: +#0 {main} + thrown in %s on line %d diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index b2e3e60a2941..1a9505902001 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -1501,6 +1501,10 @@ ZEND_VM_HELPER(zend_pre_inc_helper, VAR|CV, ANY) } increment_function(var_ptr); if (UNEXPECTED(EG(exception))) { + /* Smart branch expects result to be set with exceptions */ + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_NULL(EX_VAR(opline->result.var)); + } HANDLE_EXCEPTION(); } } while (0); @@ -1556,6 +1560,10 @@ ZEND_VM_HELPER(zend_pre_dec_helper, VAR|CV, ANY) } decrement_function(var_ptr); if (UNEXPECTED(EG(exception))) { + /* Smart branch expects result to be set with exceptions */ + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_NULL(EX_VAR(opline->result.var)); + } HANDLE_EXCEPTION(); } } while (0); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 1db9b06a1788..881dec2d9d3f 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -21625,6 +21625,10 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_inc_help } increment_function(var_ptr); if (UNEXPECTED(EG(exception))) { + /* Smart branch expects result to be set with exceptions */ + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_NULL(EX_VAR(opline->result.var)); + } HANDLE_EXCEPTION(); } } while (0); @@ -21698,6 +21702,10 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_dec_help } decrement_function(var_ptr); if (UNEXPECTED(EG(exception))) { + /* Smart branch expects result to be set with exceptions */ + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_NULL(EX_VAR(opline->result.var)); + } HANDLE_EXCEPTION(); } } while (0); @@ -39000,6 +39008,10 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_inc_help } increment_function(var_ptr); if (UNEXPECTED(EG(exception))) { + /* Smart branch expects result to be set with exceptions */ + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_NULL(EX_VAR(opline->result.var)); + } HANDLE_EXCEPTION(); } } while (0); @@ -39072,6 +39084,10 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_dec_help } decrement_function(var_ptr); if (UNEXPECTED(EG(exception))) { + /* Smart branch expects result to be set with exceptions */ + if (UNEXPECTED(RETURN_VALUE_USED(opline))) { + ZVAL_NULL(EX_VAR(opline->result.var)); + } HANDLE_EXCEPTION(); } } while (0); From af4eabd8c9dbab698fa76724e529f82573ef3598 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Tue, 1 Aug 2023 13:42:55 +0100 Subject: [PATCH 051/120] Remove unnecessary requires in mysqli tests --- .../gracefull_fail_on_empty_result_set.phpt | 10 +++++----- .../mysqli_class_mysqli_result_interface.phpt | 1 - .../mysqli_class_mysqli_stmt_interface.phpt | 1 - ext/mysqli/tests/mysqli_data_seek.phpt | 2 -- ext/mysqli/tests/mysqli_data_seek_oo.phpt | 1 - ext/mysqli/tests/mysqli_fetch_all.phpt | 2 -- ext/mysqli/tests/mysqli_fetch_all_oo.phpt | 12 +----------- ext/mysqli/tests/mysqli_fetch_array.phpt | 2 -- ext/mysqli/tests/mysqli_fetch_array_oo.phpt | 9 +-------- ext/mysqli/tests/mysqli_fetch_assoc.phpt | 2 -- .../tests/mysqli_fetch_assoc_no_alias_utf8.phpt | 11 ++++++----- ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt | 9 +-------- ext/mysqli/tests/mysqli_fetch_column.phpt | 2 -- ext/mysqli/tests/mysqli_fetch_field.phpt | 2 -- ext/mysqli/tests/mysqli_fetch_field_direct.phpt | 2 -- .../tests/mysqli_fetch_field_direct_oo.phpt | 7 +------ ext/mysqli/tests/mysqli_fetch_field_oo.phpt | 6 +----- ext/mysqli/tests/mysqli_fetch_fields.phpt | 2 -- ext/mysqli/tests/mysqli_fetch_lengths.phpt | 8 +------- ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt | 6 +----- ext/mysqli/tests/mysqli_fetch_object.phpt | 2 -- .../mysqli_fetch_object_no_constructor.phpt | 5 ----- ext/mysqli/tests/mysqli_fetch_object_oo.phpt | 6 +----- ext/mysqli/tests/mysqli_fetch_row.phpt | 2 -- ext/mysqli/tests/mysqli_field_count.phpt | 2 -- ext/mysqli/tests/mysqli_field_seek.phpt | 2 -- ext/mysqli/tests/mysqli_field_tell.phpt | 2 -- ext/mysqli/tests/mysqli_free_result.phpt | 2 -- ext/mysqli/tests/mysqli_get_charset.phpt | 11 +++++------ .../tests/mysqli_get_connection_stats.phpt | 17 +++++++++++------ ext/mysqli/tests/mysqli_get_host_info.phpt | 10 +++++----- ext/mysqli/tests/mysqli_get_proto_info.phpt | 6 +++++- ext/mysqli/tests/mysqli_get_server_info.phpt | 10 +++++----- ext/mysqli/tests/mysqli_get_server_version.phpt | 6 +++++- ext/mysqli/tests/mysqli_info.phpt | 2 -- ext/mysqli/tests/mysqli_insert_id.phpt | 2 -- ext/mysqli/tests/mysqli_kill.phpt | 2 -- ext/mysqli/tests/mysqli_more_results.phpt | 2 -- ext/mysqli/tests/mysqli_multi_query.phpt | 2 -- ext/mysqli/tests/mysqli_next_result.phpt | 2 -- ext/mysqli/tests/mysqli_num_fields.phpt | 2 -- ext/mysqli/tests/mysqli_num_rows.phpt | 2 -- ext/mysqli/tests/mysqli_ping.phpt | 7 +++++-- ext/mysqli/tests/mysqli_prepare.phpt | 2 -- ext/mysqli/tests/mysqli_query.phpt | 2 -- ext/mysqli/tests/mysqli_query_iterators.phpt | 5 ----- ext/mysqli/tests/mysqli_real_escape_string.phpt | 2 -- .../tests/mysqli_real_escape_string_big5.phpt | 1 - .../mysqli_real_escape_string_eucjpms.phpt | 1 - .../tests/mysqli_real_escape_string_euckr.phpt | 1 - .../tests/mysqli_real_escape_string_gb2312.phpt | 1 - .../tests/mysqli_real_escape_string_gbk.phpt | 1 - .../mysqli_real_escape_string_nobackslash.phpt | 1 - .../tests/mysqli_real_escape_string_sjis.phpt | 3 --- .../mysqli_real_escape_string_unicode.phpt | 11 +++++------ ext/mysqli/tests/mysqli_real_query.phpt | 2 -- ext/mysqli/tests/mysqli_report_wo_ps.phpt | 11 ++++++----- .../tests/mysqli_result_invalid_mode.phpt | 12 ++++++------ ext/mysqli/tests/mysqli_sqlstate.phpt | 2 -- ext/mysqli/tests/mysqli_stat.phpt | 7 +++++-- ext/mysqli/tests/mysqli_stmt_attr_get.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_attr_set.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_big_prepare.phpt | 14 +++++--------- ext/mysqli/tests/mysqli_stmt_bind_param.phpt | 2 -- ...i_stmt_bind_param_check_param_no_change.phpt | 11 ++++++----- ext/mysqli/tests/mysqli_stmt_bind_result.phpt | 1 - ext/mysqli/tests/mysqli_stmt_close.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_data_seek.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_errno.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_error.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_execute_bind.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_fetch.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_field_count.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_free_result.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_get_result.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_get_result2.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_init.phpt | 11 +++++------ ext/mysqli/tests/mysqli_stmt_insert_id.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_num_rows.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_param_count.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_prepare.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_reset.phpt | 2 -- .../tests/mysqli_stmt_result_metadata.phpt | 2 -- .../tests/mysqli_stmt_send_long_data.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_sqlstate.phpt | 2 -- ext/mysqli/tests/mysqli_stmt_store_result.phpt | 2 -- ext/mysqli/tests/mysqli_store_result.phpt | 2 -- .../tests/mysqli_store_result_buffered_c.phpt | 6 ------ ext/mysqli/tests/mysqli_store_result_copy.phpt | 5 ----- ext/mysqli/tests/mysqli_thread_id.phpt | 11 +++++------ ext/mysqli/tests/mysqli_use_result.phpt | 2 -- ext/mysqli/tests/mysqli_warning_count.phpt | 2 -- 92 files changed, 103 insertions(+), 274 deletions(-) diff --git a/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt b/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt index 287bca768784..1ec24c031a3f 100644 --- a/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt +++ b/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt @@ -9,7 +9,11 @@ require_once 'skipifconnectfailure.inc'; --FILE-- multi_query("SELECT 1"); @@ -24,10 +28,6 @@ require_once 'skipifconnectfailure.inc'; $link->close(); ?> ---CLEAN-- - --EXPECT-- bool(false) object(mysqli_result)#3 (5) { diff --git a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt index 46c1348283db..4e23de5cab54 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_result_interface.phpt @@ -8,7 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- query("SELECT * FROM test ORDER BY id LIMIT 2")) { printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error); } diff --git a/ext/mysqli/tests/mysqli_fetch_array.phpt b/ext/mysqli/tests/mysqli_fetch_array.phpt index 8e745fb1d4eb..ed1c76f3dedd 100644 --- a/ext/mysqli/tests/mysqli_fetch_array.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array.phpt @@ -8,8 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- query("SELECT * FROM test ORDER BY id LIMIT 5")) { printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error); diff --git a/ext/mysqli/tests/mysqli_fetch_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_assoc.phpt index de8338ad5f65..0048ba4dd1eb 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc.phpt @@ -8,8 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- ---CLEAN-- - --EXPECTF-- [003] array(3) { diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt index 82cf1299c033..14c491cca631 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt @@ -8,11 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- query("SELECT id, label FROM test ORDER BY id LIMIT 1")) { printf("[004] [%d] %s\n", $mysqli->errno, $mysqli->error); diff --git a/ext/mysqli/tests/mysqli_fetch_column.phpt b/ext/mysqli/tests/mysqli_fetch_column.phpt index 8b011628889c..84ed9c3b966f 100644 --- a/ext/mysqli/tests/mysqli_fetch_column.phpt +++ b/ext/mysqli/tests/mysqli_fetch_column.phpt @@ -8,8 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- query("SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 1")) { printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt index 67f1b048950f..f6afbd75903f 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt @@ -8,8 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- query("SELECT id, label FROM test ORDER BY id LIMIT 1")) { printf("[002] [%d] %s\n", $mysqli->errno, $mysqli->error); } diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index 45d29bbd2e8b..e6ab9245152f 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -8,8 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- --FILE-- query("SELECT id AS ID, label FROM test AS TEST ORDER BY id LIMIT 5")) { printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error); diff --git a/ext/mysqli/tests/mysqli_fetch_row.phpt b/ext/mysqli/tests/mysqli_fetch_row.phpt index 58bca0acbd45..a2669a099ab5 100644 --- a/ext/mysqli/tests/mysqli_fetch_row.phpt +++ b/ext/mysqli/tests/mysqli_fetch_row.phpt @@ -8,8 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- ---CLEAN-- - --EXPECT-- mysqli object is already closed done! diff --git a/ext/mysqli/tests/mysqli_get_connection_stats.phpt b/ext/mysqli/tests/mysqli_get_connection_stats.phpt index bd608d553a16..d108d7d3d497 100644 --- a/ext/mysqli/tests/mysqli_get_connection_stats.phpt +++ b/ext/mysqli/tests/mysqli_get_connection_stats.phpt @@ -14,7 +14,12 @@ if (!function_exists('mysqli_get_connection_stats')) { ?> --FILE-- ---CLEAN-- - --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_host_info.phpt b/ext/mysqli/tests/mysqli_get_host_info.phpt index bfa70693a569..8f9cc9a5be12 100644 --- a/ext/mysqli/tests/mysqli_get_host_info.phpt +++ b/ext/mysqli/tests/mysqli_get_host_info.phpt @@ -9,8 +9,12 @@ require_once 'skipifconnectfailure.inc'; --FILE-- ---CLEAN-- - --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_proto_info.phpt b/ext/mysqli/tests/mysqli_get_proto_info.phpt index 0300aaacb033..cf306a7e7cec 100644 --- a/ext/mysqli/tests/mysqli_get_proto_info.phpt +++ b/ext/mysqli/tests/mysqli_get_proto_info.phpt @@ -9,8 +9,12 @@ require_once 'skipifconnectfailure.inc'; --FILE-- ---CLEAN-- - --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_server_version.phpt b/ext/mysqli/tests/mysqli_get_server_version.phpt index 0b714644a635..f6411cbeac50 100644 --- a/ext/mysqli/tests/mysqli_get_server_version.phpt +++ b/ext/mysqli/tests/mysqli_get_server_version.phpt @@ -9,8 +9,12 @@ require_once 'skipifconnectfailure.inc'; --FILE-- 50105 -- major_version*10000 + minor_version *100 + sub_version */ /* < 30000 = pre 3.2.3, very unlikely! */ if (!is_int($info = mysqli_get_server_version($link)) || ($info < (3 * 10000))) diff --git a/ext/mysqli/tests/mysqli_info.phpt b/ext/mysqli/tests/mysqli_info.phpt index dea2516d1095..ce1d05507539 100644 --- a/ext/mysqli/tests/mysqli_info.phpt +++ b/ext/mysqli/tests/mysqli_info.phpt @@ -10,8 +10,6 @@ require_once 'skipifconnectfailure.inc'; mysqli.allow_local_infile=1 --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- ---CLEAN-- - --EXPECT-- mysqli object is already closed done! diff --git a/ext/mysqli/tests/mysqli_real_query.phpt b/ext/mysqli/tests/mysqli_real_query.phpt index 92d9b5bf7782..897c07a464f1 100644 --- a/ext/mysqli/tests/mysqli_real_query.phpt +++ b/ext/mysqli/tests/mysqli_real_query.phpt @@ -8,8 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- = 50600) if (true !== ($tmp = mysqli_report(MYSQLI_REPORT_OFF))) printf("[008] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp); - require 'table.inc'; + require_once 'connect.inc'; + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf("Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", + $host, $user, $db, $port, $socket); + exit(1); + } /* Internal macro MYSQL_REPORT_ERROR @@ -99,10 +104,6 @@ if (mysqli_get_server_version($link) >= 50600) print "done!"; ?> ---CLEAN-- - --EXPECTF-- Warning: mysqli_multi_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'BAR; FOO' at line 1 in %s on line %d diff --git a/ext/mysqli/tests/mysqli_result_invalid_mode.phpt b/ext/mysqli/tests/mysqli_result_invalid_mode.phpt index aeac038682e5..f0799120742b 100644 --- a/ext/mysqli/tests/mysqli_result_invalid_mode.phpt +++ b/ext/mysqli/tests/mysqli_result_invalid_mode.phpt @@ -8,8 +8,12 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- ---CLEAN-- - --EXPECT-- mysqli_result::__construct(): Argument #2 ($result_mode) must be either MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT mysqli_result::__construct(): Argument #2 ($result_mode) must be either MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT diff --git a/ext/mysqli/tests/mysqli_sqlstate.phpt b/ext/mysqli/tests/mysqli_sqlstate.phpt index 483f64eae1da..8da39ee98635 100644 --- a/ext/mysqli/tests/mysqli_sqlstate.phpt +++ b/ext/mysqli/tests/mysqli_sqlstate.phpt @@ -8,8 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- --FILE-- ---CLEAN-- - --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt index 8d93dc9ceb9e..180de7cc43f2 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt @@ -17,8 +17,6 @@ require_once 'skipifconnectfailure.inc'; in this file and we test mysqli_stmt_bind_result() in the other test -- therefore the "duplicate" makes some sense to me. */ - require_once 'connect.inc'; - require 'table.inc'; $stmt = mysqli_stmt_init($link); diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt index b941edcfe5fd..f9abc02e0640 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt @@ -8,7 +8,12 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- set_charset('latin1'); class foo { @@ -62,10 +67,6 @@ require_once 'skipifconnectfailure.inc'; echo "$one - $two\n\n"; echo "done!"; ?> ---CLEAN-- - --EXPECTF-- Test 1: object(foo)#%d (1) { diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt index 31523599da3e..11d8e64e9660 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt @@ -8,7 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- ---CLEAN-- - --EXPECT-- mysqli_stmt object is not fully initialized mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt index 2fe2edd9c560..044b2b1e5ead 100644 --- a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt @@ -8,8 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- ---CLEAN-- - --EXPECT-- mysqli object is already closed done! diff --git a/ext/mysqli/tests/mysqli_use_result.phpt b/ext/mysqli/tests/mysqli_use_result.phpt index ea03e9a9a6c8..d5a34a9d08d6 100644 --- a/ext/mysqli/tests/mysqli_use_result.phpt +++ b/ext/mysqli/tests/mysqli_use_result.phpt @@ -8,8 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- --FILE-- Date: Tue, 1 Aug 2023 18:03:00 +0100 Subject: [PATCH 052/120] Improve test for mysqli_result constructor --- ext/mysqli/tests/062.phpt | 35 +++++++++++++------ ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt | 8 ----- .../tests/mysqli_fetch_field_direct_oo.phpt | 8 ----- ext/mysqli/tests/mysqli_fetch_field_oo.phpt | 9 ----- ext/mysqli/tests/mysqli_fetch_object_oo.phpt | 8 ----- 5 files changed, 25 insertions(+), 43 deletions(-) diff --git a/ext/mysqli/tests/062.phpt b/ext/mysqli/tests/062.phpt index 2a020ebe0495..62fd3adc4b26 100644 --- a/ext/mysqli/tests/062.phpt +++ b/ext/mysqli/tests/062.phpt @@ -1,5 +1,5 @@ --TEST-- -resultset constructor +mysqli_result constructor --EXTENSIONS-- mysqli --SKIPIF-- @@ -8,24 +8,39 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- real_query("SELECT 'foo' FROM DUAL"); +$mysqli->real_query("SELECT 'foo' FROM DUAL"); - $myresult = new mysqli_result($mysql); +$myresult = new mysqli_result($mysqli); - $row = $myresult->fetch_row(); - $myresult->close(); - $mysql->close(); +$row = $myresult->fetch_row(); +$myresult->close(); +$mysqli->close(); - var_dump($row); - print "done!"; +var_dump($row); + +try { + new mysqli_result($mysqli); +} catch (Error $exception) { + echo $exception->getMessage() . "\n"; +} + +$mysqli = new mysqli(); +try { + new mysqli_result($mysqli); +} catch (Error $exception) { + echo $exception->getMessage() . "\n"; +} +print "done!"; ?> --EXPECT-- array(1) { [0]=> string(3) "foo" } +my_mysqli object is already closed +mysqli object is not fully initialized done! diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt index 14c491cca631..f330820045f3 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_oo.phpt @@ -9,13 +9,6 @@ require_once 'skipifconnectfailure.inc'; --FILE-- getMessage() . "\n"; - } - require 'table.inc'; $mysqli = $link; @@ -54,7 +47,6 @@ require_once 'skipifconnectfailure.inc'; require_once 'clean_table.inc'; ?> --EXPECT-- -mysqli object is not fully initialized [005] array(2) { ["id"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt index 6dc811485420..b4b835d97823 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt @@ -8,13 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- getMessage() . "\n"; - } - require 'table.inc'; $mysqli = $link; @@ -52,7 +45,6 @@ require_once 'skipifconnectfailure.inc'; require_once 'clean_table.inc'; ?> --EXPECTF-- -mysqli object is not fully initialized mysqli_result::fetch_field_direct(): Argument #1 ($index) must be greater than or equal to 0 object(stdClass)#%d (13) { ["name"]=> diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt index f6afbd75903f..1fa84f36fae9 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt @@ -9,14 +9,6 @@ require_once 'skipifconnectfailure.inc'; --FILE-- getMessage() . "\n"; - } - require 'table.inc'; $mysqli = $link; @@ -62,7 +54,6 @@ require_once 'skipifconnectfailure.inc'; require_once 'clean_table.inc'; ?> --EXPECTF-- -mysqli object is not fully initialized object(stdClass)#%d (13) { ["name"]=> string(2) "ID" diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index 81b406417275..b7b2c7812a96 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -8,13 +8,6 @@ require_once 'skipifconnectfailure.inc'; ?> --FILE-- getMessage(), "\n"; - } - require 'table.inc'; $mysqli = $link; @@ -123,7 +116,6 @@ require_once 'skipifconnectfailure.inc'; require_once 'clean_table.inc'; ?> --EXPECT-- -Error: mysqli object is not fully initialized Error: Object of class mysqli could not be converted to string ArgumentCountError: mysqli_result::fetch_object() expects at most 2 arguments, 3 given TypeError: mysqli_result::fetch_object(): Argument #2 ($constructor_args) must be of type array, null given From aab36a774a697b6b0957de295215c4be4d63e539 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Tue, 1 Aug 2023 18:30:46 +0100 Subject: [PATCH 053/120] Tidy up new my_mysqli in tests --- ext/mysqli/tests/065.phpt | 3 +-- ext/mysqli/tests/connect.inc | 10 ++++++++++ ext/mysqli/tests/mysqli_affected_rows_oo.phpt | 5 +---- ext/mysqli/tests/mysqli_autocommit_oo.phpt | 5 +---- ext/mysqli/tests/mysqli_change_user_oo.phpt | 8 ++------ ext/mysqli/tests/mysqli_character_set_name_oo.phpt | 7 +------ ext/mysqli/tests/mysqli_close_oo.phpt | 7 +------ ext/mysqli/tests/mysqli_commit_oo.phpt | 8 +------- ext/mysqli/tests/mysqli_connect_twice.phpt | 4 +--- ext/mysqli/tests/mysqli_get_warnings.phpt | 9 +++------ ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt | 8 ++------ ext/mysqli/tests/mysqli_pconn_twice.phpt | 5 +---- ext/mysqli/tests/mysqli_prepare_no_object.phpt | 4 +--- 13 files changed, 26 insertions(+), 57 deletions(-) diff --git a/ext/mysqli/tests/065.phpt b/ext/mysqli/tests/065.phpt index d1c2a813dc89..0a6ca356a205 100644 --- a/ext/mysqli/tests/065.phpt +++ b/ext/mysqli/tests/065.phpt @@ -10,8 +10,7 @@ require_once 'skipifconnectfailure.inc'; report_mode; + $driver->report_mode = MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT; + if ($flags !== 0) { parent::__construct(); $this->real_connect($host, $user, $passwd, $db, $port, $socket, $flags); } else { parent::__construct($host, $user, $passwd, $db, $port, $socket); } + + // Restore error mode + $driver->report_mode = $report_mode; } } diff --git a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt index 69aec1ec24fd..311cef500e91 100644 --- a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt +++ b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt @@ -17,10 +17,7 @@ mysqli echo $exception->getMessage() . "\n"; } - if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) { - printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket); - } + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (0 !== ($tmp = $mysqli->affected_rows)) printf("[002] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp); diff --git a/ext/mysqli/tests/mysqli_autocommit_oo.phpt b/ext/mysqli/tests/mysqli_autocommit_oo.phpt index fe8ac72e02c5..f6219688140f 100644 --- a/ext/mysqli/tests/mysqli_autocommit_oo.phpt +++ b/ext/mysqli/tests/mysqli_autocommit_oo.phpt @@ -17,10 +17,7 @@ mysqli autocommit(true))) printf("[002] Expecting boolean/any, got %s/%s\n", gettype($tmp), $tmp); diff --git a/ext/mysqli/tests/mysqli_change_user_oo.phpt b/ext/mysqli/tests/mysqli_change_user_oo.phpt index fdfd331f2518..ea7873f31b31 100644 --- a/ext/mysqli/tests/mysqli_change_user_oo.phpt +++ b/ext/mysqli/tests/mysqli_change_user_oo.phpt @@ -18,9 +18,7 @@ if (mysqli_get_server_version($link) >= 50600) $link = NULL; $tmp = NULL; - if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) - printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (false !== ($tmp = $mysqli->change_user($user . '_unknown_really', $passwd . 'non_empty', $db))) printf("[006] Expecting false, got %s/%s\n", gettype($tmp), $tmp); @@ -32,9 +30,7 @@ if (mysqli_get_server_version($link) >= 50600) printf("[008] Expecting false, got %s/%s\n", gettype($tmp), $tmp); // Reconnect because after 3 failed change_user attempts, the server blocks you off. - if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) - printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (!$mysqli->query('SET @mysqli_change_user_test_var=1')) printf("[009] Failed to set test variable: [%d] %s\n", $mysqli->errno, $mysqli->error); diff --git a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt index af2077d10d14..4a1f5ea60049 100644 --- a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt +++ b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt @@ -11,12 +11,7 @@ require_once 'skipifconnectfailure.inc'; /* NOTE: http://bugs.mysql.com/bug.php?id=7923 makes this test fail very likely on all 4.1.x - 5.0.x! */ require_once 'connect.inc'; - $tmp = NULL; - $link = NULL; - - if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) - printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (!$res = $mysqli->query('SELECT version() AS server_version')) printf("[003] [%d] %s\n", $mysqli->errno, $mysqli->error); diff --git a/ext/mysqli/tests/mysqli_close_oo.phpt b/ext/mysqli/tests/mysqli_close_oo.phpt index 602ec3354b27..3aafdbdc95fb 100644 --- a/ext/mysqli/tests/mysqli_close_oo.phpt +++ b/ext/mysqli/tests/mysqli_close_oo.phpt @@ -10,12 +10,7 @@ require_once 'skipifconnectfailure.inc'; close(); if (true !== $tmp) diff --git a/ext/mysqli/tests/mysqli_commit_oo.phpt b/ext/mysqli/tests/mysqli_commit_oo.phpt index f9c1865328fa..d0ff739b8af3 100644 --- a/ext/mysqli/tests/mysqli_commit_oo.phpt +++ b/ext/mysqli/tests/mysqli_commit_oo.phpt @@ -15,9 +15,6 @@ if (!have_innodb($link)) commit(); @@ -25,10 +22,7 @@ if (!have_innodb($link)) echo $exception->getMessage() . "\n"; } - if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) { - printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket); - } + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (true !== ($tmp = $mysqli->commit())) { printf("[002] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp); diff --git a/ext/mysqli/tests/mysqli_connect_twice.phpt b/ext/mysqli/tests/mysqli_connect_twice.phpt index 6bcb07a173fb..2564933dfdf4 100644 --- a/ext/mysqli/tests/mysqli_connect_twice.phpt +++ b/ext/mysqli/tests/mysqli_connect_twice.phpt @@ -35,9 +35,7 @@ require_once 'skipifconnectfailure.inc'; mysqli_close($link); - if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) - printf("[007] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket); + $link = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (!$thread_id = $link->thread_id) printf("[008] Cannot determine thread id, test will fail, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); diff --git a/ext/mysqli/tests/mysqli_get_warnings.phpt b/ext/mysqli/tests/mysqli_get_warnings.phpt index 1c2087e88eb5..08831200648d 100644 --- a/ext/mysqli/tests/mysqli_get_warnings.phpt +++ b/ext/mysqli/tests/mysqli_get_warnings.phpt @@ -83,8 +83,7 @@ if (!$TEST_EXPERIMENTAL) mysqli_close($link); - if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) - printf("[021] Cannot create mysqli object: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (!$mysqli->query("DROP TABLE IF EXISTS t1")) printf("[022] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); @@ -101,8 +100,7 @@ if (!$TEST_EXPERIMENTAL) printf("[026] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); /* Yes, I really want to check if the object property is empty */ - if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) - printf("[027] Cannot create mysqli object: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); $warning = new mysqli_warning($mysqli); if (false !== ($tmp = $warning->next())) @@ -111,8 +109,7 @@ if (!$TEST_EXPERIMENTAL) if ('' != ($tmp = $warning->message)) printf("[029] Expecting string/empty, got %s/%s\n", gettype($tmp), $tmp); - if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) - printf("[030] Cannot create mysqli object: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (!$mysqli->query("DROP TABLE IF EXISTS t1")) printf("[031] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); diff --git a/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt b/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt index 795c8664a222..8c125054f881 100644 --- a/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt +++ b/ext/mysqli/tests/mysqli_pconn_conn_multiple.phpt @@ -41,9 +41,7 @@ mysqli.max_links=-1 mysqli_close($link); - if (!$link = new my_mysqli($phost, $user, $passwd, $db, $port, $socket)) - printf("[007] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $phost, $user, $db, $port, $socket); + $link = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (!$thread_id = $link->thread_id) printf("[008] Cannot determine thread id, test will fail, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); @@ -103,9 +101,7 @@ mysqli.max_links=-1 mysqli_close($link); - if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) - printf("[022] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket); + $link = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (!$thread_id = $link->thread_id) printf("[023] Cannot determine thread id, test will fail, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); diff --git a/ext/mysqli/tests/mysqli_pconn_twice.phpt b/ext/mysqli/tests/mysqli_pconn_twice.phpt index 219fe385dae1..8ef8aea2b950 100644 --- a/ext/mysqli/tests/mysqli_pconn_twice.phpt +++ b/ext/mysqli/tests/mysqli_pconn_twice.phpt @@ -34,10 +34,7 @@ mysqli.max_links=-1 mysqli_close($link); - if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) - printf("[007] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket); - + $link = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (true !== ($tmp = $link->real_connect($host, $user, $passwd, $db, $port, $socket))) printf("[009] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp); diff --git a/ext/mysqli/tests/mysqli_prepare_no_object.phpt b/ext/mysqli/tests/mysqli_prepare_no_object.phpt index aec432260a28..c488cbe50591 100644 --- a/ext/mysqli/tests/mysqli_prepare_no_object.phpt +++ b/ext/mysqli/tests/mysqli_prepare_no_object.phpt @@ -20,9 +20,7 @@ require_once 'skipifconnectfailure.inc'; mysqli_close($link); - if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) - printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket); + $mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket); if (false !== ($tmp = $mysqli->prepare(false))) printf("[004] Expecting boolean/false, got %s/%s\n", gettype($tmp), (is_object($tmp) ? var_dump($tmp, true) : $tmp)); From 0c288c40981ec44e5804ec06da5d59bfc4e50865 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Tue, 1 Aug 2023 22:07:37 +0100 Subject: [PATCH 054/120] Revert changes to mysqli_get_connection_stats.phpt --- .../tests/mysqli_get_connection_stats.phpt | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/ext/mysqli/tests/mysqli_get_connection_stats.phpt b/ext/mysqli/tests/mysqli_get_connection_stats.phpt index d108d7d3d497..dfca21c222ab 100644 --- a/ext/mysqli/tests/mysqli_get_connection_stats.phpt +++ b/ext/mysqli/tests/mysqli_get_connection_stats.phpt @@ -14,12 +14,9 @@ if (!function_exists('mysqli_get_connection_stats')) { ?> --FILE-- +--CLEAN-- + --EXPECT-- done! From ab46d2012c5afe481990013f131982bb4d5004b7 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Tue, 1 Aug 2023 22:20:18 +0100 Subject: [PATCH 055/120] Remove unused CLEAN section --- ext/mysqli/tests/mysqli_real_connect.phpt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ext/mysqli/tests/mysqli_real_connect.phpt b/ext/mysqli/tests/mysqli_real_connect.phpt index 51f7c6cd73bb..fa854f8267bb 100644 --- a/ext/mysqli/tests/mysqli_real_connect.phpt +++ b/ext/mysqli/tests/mysqli_real_connect.phpt @@ -146,10 +146,6 @@ mysqli.allow_local_infile=1 print "done!"; ?> ---CLEAN-- - --EXPECTF-- Warning: mysqli_real_connect(): (%s/%d): Access denied for user '%s'@'%s' %r(\(using password: \w+\) ){0,1}%rin %s on line %d object(mysqli)#%d (%d) { From 66b359e4de3e0f4f49b8a213407f0bf4b9a7fb11 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Tue, 1 Aug 2023 22:28:18 +0100 Subject: [PATCH 056/120] Add DROP TABLE to clean up after the test --- ext/mysqli/tests/gh8267.phpt | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/mysqli/tests/gh8267.phpt b/ext/mysqli/tests/gh8267.phpt index d7c0e8d80e93..067d0beef2cf 100644 --- a/ext/mysqli/tests/gh8267.phpt +++ b/ext/mysqli/tests/gh8267.phpt @@ -17,6 +17,7 @@ $mysqli->query("INSERT INTO foo VALUES (9223372036854775807)"); var_dump($mysqli->insert_id); $mysqli->query("INSERT INTO foo VALUES (0)"); var_dump($mysqli->insert_id); +$mysqli->query("DROP TABLE IF EXISTS foo"); ?> --EXPECT-- string(19) "9223372036854775807" From 414039464257dd6e835ff42ea31d1e616aae3f88 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 2 Aug 2023 11:50:02 -0400 Subject: [PATCH 057/120] ext/dba/tests/dba_tcadb.phpt: support pthreadless tokyocabinet (#11648) Several of our DBA tests (based on setup/setup_dba_tests.inc) have a "no lock" version whose expected output is: SAME OUTPUT AS PREVIOUS RUN (modulo read during write due to no lock) This tokyocabinet test, however, is missing the "modulo" bit, because it is not output when tokyocabinet is built with pthreads support, as is the case on at least Fedora and the GitHub CI. To additionally support systems where tokyocabinet is built WITHOUT pthreads support, this commit adds a wildcard at the end of the expected output to catch the " (modulo..." string. --- ext/dba/tests/dba_tcadb.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/dba/tests/dba_tcadb.phpt b/ext/dba/tests/dba_tcadb.phpt index 6459c5b372ea..d0a0e34cb8e3 100644 --- a/ext/dba/tests/dba_tcadb.phpt +++ b/ext/dba/tests/dba_tcadb.phpt @@ -23,7 +23,7 @@ require_once __DIR__ . '/setup/setup_dba_tests.inc'; $db_name = 'dba_tcadb.tch'; cleanup_standard_db($db_name); ?> ---EXPECT-- +--EXPECTF-- === RUNNING WITH FILE LOCK === Remove key 1 and 3 bool(true) @@ -71,4 +71,4 @@ array(6) { === RUNNING WITH DB LOCK (default) === SAME OUTPUT AS PREVIOUS RUN === RUNNING WITH NO LOCK === -SAME OUTPUT AS PREVIOUS RUN +SAME OUTPUT AS PREVIOUS RUN%S From b2dbf0a2c68425d374a3eb7fd14fff2a1ad26061 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 31 Jul 2023 15:09:06 +0200 Subject: [PATCH 058/120] Remove opcache.consistency_checks This feature has been broken at least since the tracing JIT and inheritance cache have been introduced. The attempted fix (GH-10798) was too complex. We have thus decided to remove this feature for now. Closes GH-11832 --- UPGRADING | 9 +++++++++ ext/opcache/ZendAccelerator.c | 20 -------------------- ext/opcache/ZendAccelerator.h | 5 ----- ext/opcache/tests/gh8065.phpt | 26 -------------------------- ext/opcache/zend_accelerator_module.c | 15 --------------- ext/opcache/zend_file_cache.c | 1 - php.ini-development | 4 ---- php.ini-production | 4 ---- 8 files changed, 9 insertions(+), 75 deletions(-) delete mode 100644 ext/opcache/tests/gh8065.phpt diff --git a/UPGRADING b/UPGRADING index 1bc576d007ce..d08bc9f0fd94 100644 --- a/UPGRADING +++ b/UPGRADING @@ -50,6 +50,15 @@ PHP 8.3 UPGRADE NOTES . C functions that have a return type of void now return null instead of returning the following object object(FFI\CData:void) { } +- Opcache: + . The opcache.consistency_checks INI directive was removed. This feature was + broken with the tracing JIT, as well as with inheritance cache, and has been + disabled without a way to enable it since PHP 8.1.18 and PHP 8.2.5. Both the + tracing JIT and inheritance cache may modify shm after the script has been + persisted, invalidating its checksum. The attempted fix skipped over the + modifiable pointers but was rejected due to complexity. For this reason, it + was decided to remove the feature instead. + - Standard: . The range() function has had various changes: * A TypeError is now thrown when passing objects, resources, or arrays diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 32cf51301329..0346a44e3dc0 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -1538,8 +1538,6 @@ static zend_persistent_script *store_script_in_file_cache(zend_persistent_script (size_t)ZCG(mem)); } - new_persistent_script->dynamic_members.checksum = zend_accel_script_checksum(new_persistent_script); - zend_file_cache_script_store(new_persistent_script, /* is_shm */ false); return new_persistent_script; @@ -1653,8 +1651,6 @@ static zend_persistent_script *cache_script_in_shared_memory(zend_persistent_scr (size_t)ZCG(mem)); } - new_persistent_script->dynamic_members.checksum = zend_accel_script_checksum(new_persistent_script); - /* store script structure in the hash table */ bucket = zend_accel_hash_update(&ZCSG(hash), new_persistent_script->script.filename, 0, new_persistent_script); if (bucket) { @@ -2131,20 +2127,6 @@ zend_op_array *persistent_compile_file(zend_file_handle *file_handle, int type) } } - /* if turned on - check the compiled script ADLER32 checksum */ - if (persistent_script && ZCG(accel_directives).consistency_checks - && persistent_script->dynamic_members.hits % ZCG(accel_directives).consistency_checks == 0) { - - unsigned int checksum = zend_accel_script_checksum(persistent_script); - if (checksum != persistent_script->dynamic_members.checksum ) { - /* The checksum is wrong */ - zend_accel_error(ACCEL_LOG_INFO, "Checksum failed for '%s': expected=0x%08x, found=0x%08x", - ZSTR_VAL(persistent_script->script.filename), persistent_script->dynamic_members.checksum, checksum); - zend_accel_lock_discard_script(persistent_script); - persistent_script = NULL; - } - } - /* Check the second level cache */ if (!persistent_script && ZCG(accel_directives).file_cache) { persistent_script = zend_file_cache_script_load(file_handle); @@ -4280,8 +4262,6 @@ static zend_persistent_script* preload_script_in_shared_memory(zend_persistent_s (size_t)ZCG(mem)); } - new_persistent_script->dynamic_members.checksum = zend_accel_script_checksum(new_persistent_script); - /* store script structure in the hash table */ bucket = zend_accel_hash_update(&ZCSG(hash), new_persistent_script->script.filename, 0, new_persistent_script); if (bucket) { diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 568d8f497241..1aa1655f43eb 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -132,14 +132,10 @@ typedef struct _zend_persistent_script { void *mem; /* shared memory area used by script structures */ size_t size; /* size of used shared memory */ - /* All entries that shouldn't be counted in the ADLER32 - * checksum must be declared in this struct - */ struct zend_persistent_script_dynamic_members { time_t last_used; zend_ulong hits; unsigned int memory_consumption; - unsigned int checksum; time_t revalidate; } dynamic_members; } zend_persistent_script; @@ -149,7 +145,6 @@ typedef struct _zend_accel_directives { zend_long max_accelerated_files; double max_wasted_percentage; char *user_blacklist_filename; - zend_long consistency_checks; zend_long force_restart_timeout; bool use_cwd; bool ignore_dups; diff --git a/ext/opcache/tests/gh8065.phpt b/ext/opcache/tests/gh8065.phpt deleted file mode 100644 index db951a7b0917..000000000000 --- a/ext/opcache/tests/gh8065.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -GH-8065: opcache.consistency_checks > 0 causes segfaults in PHP >= 8.1.5 in fpm context ---EXTENSIONS-- -opcache ---INI-- -opcache.enable_cli=1 -opcache.consistency_checks=1 -opcache.log_verbosity_level=2 ---FILE-- - ---EXPECTF-- -%sWarning opcache.consistency_checks is reset back to 0 because it does not work properly (see GH-8065, GH-10624). - -string(1) "0" -%sWarning opcache.consistency_checks is reset back to 0 because it does not work properly (see GH-8065, GH-10624). - -bool(false) -%sWarning opcache.consistency_checks is reset back to 0 because it does not work properly (see GH-8065, GH-10624). - -bool(false) -string(1) "0" diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index 5181af8d8c99..dc0fa961d744 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -129,19 +129,6 @@ static ZEND_INI_MH(OnUpdateMaxWastedPercentage) return SUCCESS; } -static ZEND_INI_MH(OnUpdateConsistencyChecks) -{ - zend_long *p = (zend_long *) ZEND_INI_GET_ADDR(); - zend_long consistency_checks = atoi(ZSTR_VAL(new_value)); - - if (consistency_checks != 0) { - zend_accel_error(ACCEL_LOG_WARNING, "opcache.consistency_checks is reset back to 0 because it does not work properly (see GH-8065, GH-10624).\n"); - return FAILURE; - } - *p = 0; - return SUCCESS; -} - static ZEND_INI_MH(OnEnable) { if (stage == ZEND_INI_STAGE_STARTUP || @@ -289,7 +276,6 @@ ZEND_INI_BEGIN() STD_PHP_INI_ENTRY("opcache.interned_strings_buffer", "8" , PHP_INI_SYSTEM, OnUpdateInternedStringsBuffer, accel_directives.interned_strings_buffer, zend_accel_globals, accel_globals) STD_PHP_INI_ENTRY("opcache.max_accelerated_files" , "10000", PHP_INI_SYSTEM, OnUpdateMaxAcceleratedFiles, accel_directives.max_accelerated_files, zend_accel_globals, accel_globals) STD_PHP_INI_ENTRY("opcache.max_wasted_percentage" , "5" , PHP_INI_SYSTEM, OnUpdateMaxWastedPercentage, accel_directives.max_wasted_percentage, zend_accel_globals, accel_globals) - STD_PHP_INI_ENTRY("opcache.consistency_checks" , "0" , PHP_INI_ALL , OnUpdateConsistencyChecks, accel_directives.consistency_checks, zend_accel_globals, accel_globals) STD_PHP_INI_ENTRY("opcache.force_restart_timeout" , "180" , PHP_INI_SYSTEM, OnUpdateLong, accel_directives.force_restart_timeout, zend_accel_globals, accel_globals) STD_PHP_INI_ENTRY("opcache.revalidate_freq" , "2" , PHP_INI_ALL , OnUpdateLong, accel_directives.revalidate_freq, zend_accel_globals, accel_globals) STD_PHP_INI_ENTRY("opcache.file_update_protection", "2" , PHP_INI_ALL , OnUpdateLong, accel_directives.file_update_protection, zend_accel_globals, accel_globals) @@ -804,7 +790,6 @@ ZEND_FUNCTION(opcache_get_configuration) add_assoc_long(&directives, "opcache.interned_strings_buffer",ZCG(accel_directives).interned_strings_buffer); add_assoc_long(&directives, "opcache.max_accelerated_files", ZCG(accel_directives).max_accelerated_files); add_assoc_double(&directives, "opcache.max_wasted_percentage", ZCG(accel_directives).max_wasted_percentage); - add_assoc_long(&directives, "opcache.consistency_checks", ZCG(accel_directives).consistency_checks); add_assoc_long(&directives, "opcache.force_restart_timeout", ZCG(accel_directives).force_restart_timeout); add_assoc_long(&directives, "opcache.revalidate_freq", ZCG(accel_directives).revalidate_freq); add_assoc_string(&directives, "opcache.preferred_memory_model", STRING_NOT_NULL(ZCG(accel_directives).memory_model)); diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index fdb6d59e8092..41cc5689a663 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -1936,7 +1936,6 @@ zend_persistent_script *zend_file_cache_script_load(zend_file_handle *file_handl if (cache_it) { ZCSG(map_ptr_last) = CG(map_ptr_last); - script->dynamic_members.checksum = zend_accel_script_checksum(script); script->dynamic_members.last_used = ZCG(request_time); zend_accel_hash_update(&ZCSG(hash), script->script.filename, 0, script); diff --git a/php.ini-development b/php.ini-development index e3293e8ffa50..c837e82c2fe8 100644 --- a/php.ini-development +++ b/php.ini-development @@ -1841,10 +1841,6 @@ ldap.max_links = -1 ; are cached. ;opcache.max_file_size=0 -; Check the cache checksum each N requests. -; The default value of "0" means that the checks are disabled. -;opcache.consistency_checks=0 - ; How long to wait (in seconds) for a scheduled restart to begin if the cache ; is not being accessed. ;opcache.force_restart_timeout=180 diff --git a/php.ini-production b/php.ini-production index beebc0461b47..0c9c82f56a34 100644 --- a/php.ini-production +++ b/php.ini-production @@ -1843,10 +1843,6 @@ ldap.max_links = -1 ; are cached. ;opcache.max_file_size=0 -; Check the cache checksum each N requests. -; The default value of "0" means that the checks are disabled. -;opcache.consistency_checks=0 - ; How long to wait (in seconds) for a scheduled restart to begin if the cache ; is not being accessed. ;opcache.force_restart_timeout=180 From 35862641ba5205d40d2f1482b42dcb68cbe978ab Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 2 Aug 2023 19:23:54 +0200 Subject: [PATCH 059/120] Unpoison opcache mem buf for file cache checksum calc The buffer may contain uninitialized bytes, like padding, zval.value for IS_TRUE, IS_NULL, etc. and other unused fields. The checksum calculation loops over all bytes and thus will trigger uninitialized reads in MSAN. It doesn't matter too much, as the bytes in the file will still match the checksum. --- ext/opcache/zend_file_cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 41cc5689a663..a69c7be86018 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -1118,9 +1118,6 @@ int zend_file_cache_script_store(zend_persistent_script *script, bool in_shm) zend_string *const s = (zend_string*)ZCG(mem); - info.checksum = zend_adler32(ADLER32_INIT, buf, script->size); - info.checksum = zend_adler32(info.checksum, (unsigned char*)ZSTR_VAL(s), info.str_size); - #if __has_feature(memory_sanitizer) /* The buffer may contain uninitialized regions. However, the uninitialized parts will not be * used when reading the cache. We should probably still try to get things fully initialized @@ -1129,6 +1126,9 @@ int zend_file_cache_script_store(zend_persistent_script *script, bool in_shm) __msan_unpoison(buf, script->size); #endif + info.checksum = zend_adler32(ADLER32_INIT, buf, script->size); + info.checksum = zend_adler32(info.checksum, (unsigned char*)ZSTR_VAL(s), info.str_size); + if (!zend_file_cache_script_write(fd, script, &info, buf, s)) { zend_accel_error(ACCEL_LOG_WARNING, "opcache cannot write to file '%s': %s\n", filename, strerror(errno)); zend_string_release_ex(s, 0); From fc3df283fb615337e3bf5877a6b80644cd1e458d Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 2 Aug 2023 16:13:09 +0100 Subject: [PATCH 060/120] Zend: Fix memory leak in ++/-- when overloading fetch access Closes GH-11859 --- .../in-de-crement/overloaded_access.phpt | 36 +++++++++++++++++++ Zend/zend_vm_def.h | 14 -------- Zend/zend_vm_execute.h | 28 --------------- 3 files changed, 36 insertions(+), 42 deletions(-) create mode 100644 Zend/tests/in-de-crement/overloaded_access.phpt diff --git a/Zend/tests/in-de-crement/overloaded_access.phpt b/Zend/tests/in-de-crement/overloaded_access.phpt new file mode 100644 index 000000000000..56a5c2b1d47a --- /dev/null +++ b/Zend/tests/in-de-crement/overloaded_access.phpt @@ -0,0 +1,36 @@ +--TEST-- +Overloaded array access with pre increment/decrement +--FILE-- +getMessage() . "\n"; +} +$foo = new Foo; +try { + $foo[0]--; +} catch (Throwable $ex) { + echo $ex->getMessage() . "\n"; +} +?> +--EXPECT-- +Cannot increment array +Cannot decrement array diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 1a9505902001..46f5ee566b14 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -1500,13 +1500,6 @@ ZEND_VM_HELPER(zend_pre_inc_helper, VAR|CV, ANY) } } increment_function(var_ptr); - if (UNEXPECTED(EG(exception))) { - /* Smart branch expects result to be set with exceptions */ - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_NULL(EX_VAR(opline->result.var)); - } - HANDLE_EXCEPTION(); - } } while (0); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { @@ -1559,13 +1552,6 @@ ZEND_VM_HELPER(zend_pre_dec_helper, VAR|CV, ANY) } } decrement_function(var_ptr); - if (UNEXPECTED(EG(exception))) { - /* Smart branch expects result to be set with exceptions */ - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_NULL(EX_VAR(opline->result.var)); - } - HANDLE_EXCEPTION(); - } } while (0); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 881dec2d9d3f..cba0236ab5e4 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -21624,13 +21624,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_inc_help } } increment_function(var_ptr); - if (UNEXPECTED(EG(exception))) { - /* Smart branch expects result to be set with exceptions */ - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_NULL(EX_VAR(opline->result.var)); - } - HANDLE_EXCEPTION(); - } } while (0); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { @@ -21701,13 +21694,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_dec_help } } decrement_function(var_ptr); - if (UNEXPECTED(EG(exception))) { - /* Smart branch expects result to be set with exceptions */ - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_NULL(EX_VAR(opline->result.var)); - } - HANDLE_EXCEPTION(); - } } while (0); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { @@ -39007,13 +38993,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_inc_help } } increment_function(var_ptr); - if (UNEXPECTED(EG(exception))) { - /* Smart branch expects result to be set with exceptions */ - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_NULL(EX_VAR(opline->result.var)); - } - HANDLE_EXCEPTION(); - } } while (0); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { @@ -39083,13 +39062,6 @@ static zend_never_inline ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_pre_dec_help } } decrement_function(var_ptr); - if (UNEXPECTED(EG(exception))) { - /* Smart branch expects result to be set with exceptions */ - if (UNEXPECTED(RETURN_VALUE_USED(opline))) { - ZVAL_NULL(EX_VAR(opline->result.var)); - } - HANDLE_EXCEPTION(); - } } while (0); if (UNEXPECTED(RETURN_VALUE_USED(opline))) { From 65a02f482fd75995ada6eb1afc6def2bad8c7ef7 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Wed, 2 Aug 2023 18:52:55 +0100 Subject: [PATCH 061/120] ext/zend_test: Move object handler test objects to their own file (#11852) --- ext/zend_test/config.m4 | 2 +- ext/zend_test/config.w32 | 2 +- ext/zend_test/object_handlers.c | 258 ++++++++++++++++++++++++ ext/zend_test/object_handlers.h | 22 ++ ext/zend_test/object_handlers.stub.php | 24 +++ ext/zend_test/object_handlers_arginfo.h | 114 +++++++++++ ext/zend_test/test.c | 238 +--------------------- ext/zend_test/test.stub.php | 18 -- ext/zend_test/test_arginfo.h | 112 +--------- 9 files changed, 423 insertions(+), 367 deletions(-) create mode 100644 ext/zend_test/object_handlers.c create mode 100644 ext/zend_test/object_handlers.h create mode 100644 ext/zend_test/object_handlers.stub.php create mode 100644 ext/zend_test/object_handlers_arginfo.h diff --git a/ext/zend_test/config.m4 b/ext/zend_test/config.m4 index c33ad74f0c8a..916104b61270 100644 --- a/ext/zend_test/config.m4 +++ b/ext/zend_test/config.m4 @@ -4,5 +4,5 @@ PHP_ARG_ENABLE([zend-test], [Enable zend_test extension])]) if test "$PHP_ZEND_TEST" != "no"; then - PHP_NEW_EXTENSION(zend_test, test.c observer.c fiber.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) + PHP_NEW_EXTENSION(zend_test, test.c observer.c fiber.c object_handlers.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1) fi diff --git a/ext/zend_test/config.w32 b/ext/zend_test/config.w32 index a44a7fc3d9d8..5a9700181ba7 100644 --- a/ext/zend_test/config.w32 +++ b/ext/zend_test/config.w32 @@ -3,6 +3,6 @@ ARG_ENABLE("zend-test", "enable zend_test extension", "no"); if (PHP_ZEND_TEST != "no") { - EXTENSION("zend_test", "test.c observer.c fiber.c", PHP_ZEND_TEST_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); + EXTENSION("zend_test", "test.c observer.c fiber.c object_handlers.c", PHP_ZEND_TEST_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); ADD_FLAG("CFLAGS_ZEND_TEST", "/D PHP_ZEND_TEST_EXPORTS "); } diff --git a/ext/zend_test/object_handlers.c b/ext/zend_test/object_handlers.c new file mode 100644 index 000000000000..b590c3488c1b --- /dev/null +++ b/ext/zend_test/object_handlers.c @@ -0,0 +1,258 @@ +/* + +----------------------------------------------------------------------+ + | Copyright (c) The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | https://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: George Peter Banyard | + +----------------------------------------------------------------------+ +*/ + +#include "object_handlers.h" +#include "zend_API.h" +#include "object_handlers_arginfo.h" + +/* donc refers to DoOperationNoCast */ +static zend_class_entry *donc_ce; +static zend_object_handlers donc_object_handlers; + +static zend_object* donc_object_create_ex(zend_class_entry* ce, zend_long l) { + zend_object *obj = zend_objects_new(ce); + object_properties_init(obj, ce); + obj->handlers = &donc_object_handlers; + ZVAL_LONG(OBJ_PROP_NUM(obj, 0), l); + return obj; +} +static zend_object *donc_object_create(zend_class_entry *ce) /* {{{ */ +{ + return donc_object_create_ex(ce, 0); +} +/* }}} */ + +static inline void donc_create(zval *target, zend_long l) /* {{{ */ +{ + ZVAL_OBJ(target, donc_object_create_ex(donc_ce, l)); +} + +#define IS_DONC(zval) \ + (Z_TYPE_P(zval) == IS_OBJECT && instanceof_function(Z_OBJCE_P(zval), donc_ce)) + +static void donc_add(zval *result, zval *op1, zval *op2) +{ + zend_long val_1; + zend_long val_2; + if (IS_DONC(op1)) { + val_1 = Z_LVAL_P(OBJ_PROP_NUM(Z_OBJ_P(op1), 0)); + } else { + val_1 = zval_get_long(op1); + } + if (IS_DONC(op2)) { + val_2 = Z_LVAL_P(OBJ_PROP_NUM(Z_OBJ_P(op2), 0)); + } else { + val_2 = zval_get_long(op2); + } + + donc_create(result, val_1 + val_2); +} +static void donc_mul(zval *result, zval *op1, zval *op2) +{ + zend_long val_1; + zend_long val_2; + if (IS_DONC(op1)) { + val_1 = Z_LVAL_P(OBJ_PROP_NUM(Z_OBJ_P(op1), 0)); + } else { + val_1 = zval_get_long(op1); + } + if (IS_DONC(op2)) { + val_2 = Z_LVAL_P(OBJ_PROP_NUM(Z_OBJ_P(op2), 0)); + } else { + val_2 = zval_get_long(op2); + } + + donc_create(result, val_1 * val_2); +} + +static zend_result donc_do_operation(zend_uchar opcode, zval *result, zval *op1, zval *op2) +{ + zval op1_copy; + zend_result status; + + if (result == op1) { + ZVAL_COPY_VALUE(&op1_copy, op1); + op1 = &op1_copy; + } + + switch (opcode) { + case ZEND_ADD: + donc_add(result, op1, op2); + if (UNEXPECTED(EG(exception))) { status = FAILURE; } + status = SUCCESS; + break; + case ZEND_MUL: + donc_mul(result, op1, op2); + if (UNEXPECTED(EG(exception))) { status = FAILURE; } + status = SUCCESS; + break; + default: + status = FAILURE; + break; + } + + if (status == SUCCESS && op1 == &op1_copy) { + zval_ptr_dtor(op1); + } + + return status; +} + +ZEND_METHOD(DoOperationNoCast, __construct) +{ + zend_long l; + + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_LONG(l) + ZEND_PARSE_PARAMETERS_END(); + + ZVAL_LONG(OBJ_PROP_NUM(Z_OBJ_P(ZEND_THIS), 0), l); +} + +static zend_class_entry *long_castable_no_operation_ce; +static zend_object_handlers long_castable_no_operation_object_handlers; + +static zend_object* long_castable_no_operation_object_create_ex(zend_class_entry* ce, zend_long l) { + zend_object *obj = zend_objects_new(ce); + object_properties_init(obj, ce); + obj->handlers = &long_castable_no_operation_object_handlers; + ZVAL_LONG(OBJ_PROP_NUM(obj, 0), l); + return obj; +} + +static zend_object *long_castable_no_operation_object_create(zend_class_entry *ce) +{ + return long_castable_no_operation_object_create_ex(ce, 0); +} + +static zend_result long_castable_no_operation_cast_object(zend_object *obj, zval *result, int type) +{ + if (type == IS_LONG) { + ZVAL_COPY(result, OBJ_PROP_NUM(obj, 0)); + return SUCCESS; + } + return FAILURE; +} + +ZEND_METHOD(LongCastableNoOperations, __construct) +{ + zend_long l; + + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_LONG(l) + ZEND_PARSE_PARAMETERS_END(); + + ZVAL_LONG(OBJ_PROP_NUM(Z_OBJ_P(ZEND_THIS), 0), l); +} + +static zend_class_entry *float_castable_no_operation_ce; +static zend_object_handlers float_castable_no_operation_object_handlers; + +static zend_object* float_castable_no_operation_object_create_ex(zend_class_entry* ce, double d) { + zend_object *obj = zend_objects_new(ce); + object_properties_init(obj, ce); + obj->handlers = &float_castable_no_operation_object_handlers; + ZVAL_DOUBLE(OBJ_PROP_NUM(obj, 0), d); + return obj; +} + +static zend_object *float_castable_no_operation_object_create(zend_class_entry *ce) +{ + return float_castable_no_operation_object_create_ex(ce, 0.0); +} + +static zend_result float_castable_no_operation_cast_object(zend_object *obj, zval *result, int type) +{ + if (type == IS_DOUBLE) { + ZVAL_COPY(result, OBJ_PROP_NUM(obj, 0)); + return SUCCESS; + } + return FAILURE; +} + +ZEND_METHOD(FloatCastableNoOperations, __construct) +{ + double d; + + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_DOUBLE(d) + ZEND_PARSE_PARAMETERS_END(); + + ZVAL_DOUBLE(OBJ_PROP_NUM(Z_OBJ_P(ZEND_THIS), 0), d); +} + +static zend_class_entry *numeric_castable_no_operation_ce; +static zend_object_handlers numeric_castable_no_operation_object_handlers; + +static zend_object* numeric_castable_no_operation_object_create_ex(zend_class_entry* ce, const zval *n) { + zend_object *obj = zend_objects_new(ce); + object_properties_init(obj, ce); + obj->handlers = &numeric_castable_no_operation_object_handlers; + ZVAL_COPY(OBJ_PROP_NUM(obj, 0), n); + return obj; +} + +static zend_object *numeric_castable_no_operation_object_create(zend_class_entry *ce) +{ + zval tmp; + ZVAL_LONG(&tmp, 0); + return numeric_castable_no_operation_object_create_ex(ce, &tmp); +} + +static zend_result numeric_castable_no_operation_cast_object(zend_object *obj, zval *result, int type) +{ + if (type == _IS_NUMBER) { + ZVAL_COPY(result, OBJ_PROP_NUM(obj, 0)); + return SUCCESS; + } + return FAILURE; +} + +ZEND_METHOD(NumericCastableNoOperations, __construct) +{ + zval *n; + + ZEND_PARSE_PARAMETERS_START(1, 1) + Z_PARAM_NUMBER(n) + ZEND_PARSE_PARAMETERS_END(); + + ZVAL_COPY(OBJ_PROP_NUM(Z_OBJ_P(ZEND_THIS), 0), n); +} + +void zend_test_object_handlers_init(void) +{ + /* DoOperationNoCast class */ + donc_ce = register_class_DoOperationNoCast(); + donc_ce->create_object = donc_object_create; + memcpy(&donc_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); + donc_object_handlers.do_operation = donc_do_operation; + + /* CastableNoOperation classes */ + long_castable_no_operation_ce = register_class_LongCastableNoOperations(); + long_castable_no_operation_ce->create_object = long_castable_no_operation_object_create; + memcpy(&long_castable_no_operation_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); + long_castable_no_operation_object_handlers.cast_object = long_castable_no_operation_cast_object; + + float_castable_no_operation_ce = register_class_FloatCastableNoOperations(); + float_castable_no_operation_ce->create_object = float_castable_no_operation_object_create; + memcpy(&float_castable_no_operation_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); + float_castable_no_operation_object_handlers.cast_object = float_castable_no_operation_cast_object; + + numeric_castable_no_operation_ce = register_class_NumericCastableNoOperations(); + numeric_castable_no_operation_ce->create_object = numeric_castable_no_operation_object_create; + memcpy(&numeric_castable_no_operation_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); + numeric_castable_no_operation_object_handlers.cast_object = numeric_castable_no_operation_cast_object; +} diff --git a/ext/zend_test/object_handlers.h b/ext/zend_test/object_handlers.h new file mode 100644 index 000000000000..528e047360f9 --- /dev/null +++ b/ext/zend_test/object_handlers.h @@ -0,0 +1,22 @@ +/* + +----------------------------------------------------------------------+ + | Copyright (c) The PHP Group | + +----------------------------------------------------------------------+ + | This source file is subject to version 3.01 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available through the world-wide-web at the following url: | + | https://www.php.net/license/3_01.txt | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | + +----------------------------------------------------------------------+ + | Authors: George Peter Banyard | + +----------------------------------------------------------------------+ +*/ + +#ifndef ZEND_TEST_OBJECT_HANDLERS_H +#define ZEND_TEST_OBJECT_HANDLERS_H + +void zend_test_object_handlers_init(void); + +#endif diff --git a/ext/zend_test/object_handlers.stub.php b/ext/zend_test/object_handlers.stub.php new file mode 100644 index 000000000000..81830532689e --- /dev/null +++ b/ext/zend_test/object_handlers.stub.php @@ -0,0 +1,24 @@ +ce_flags |= ZEND_ACC_FINAL; + + zval property_val_default_value; + ZVAL_UNDEF(&property_val_default_value); + zend_string *property_val_name = zend_string_init("val", sizeof("val") - 1, 1); + zend_declare_typed_property(class_entry, property_val_name, &property_val_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); + zend_string_release(property_val_name); + + return class_entry; +} + +static zend_class_entry *register_class_LongCastableNoOperations(void) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "LongCastableNoOperations", class_LongCastableNoOperations_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_FINAL; + + zval property_val_default_value; + ZVAL_UNDEF(&property_val_default_value); + zend_string *property_val_name = zend_string_init("val", sizeof("val") - 1, 1); + zend_declare_typed_property(class_entry, property_val_name, &property_val_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); + zend_string_release(property_val_name); + + return class_entry; +} + +static zend_class_entry *register_class_FloatCastableNoOperations(void) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "FloatCastableNoOperations", class_FloatCastableNoOperations_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_FINAL; + + zval property_val_default_value; + ZVAL_UNDEF(&property_val_default_value); + zend_string *property_val_name = zend_string_init("val", sizeof("val") - 1, 1); + zend_declare_typed_property(class_entry, property_val_name, &property_val_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_DOUBLE)); + zend_string_release(property_val_name); + + return class_entry; +} + +static zend_class_entry *register_class_NumericCastableNoOperations(void) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "NumericCastableNoOperations", class_NumericCastableNoOperations_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + class_entry->ce_flags |= ZEND_ACC_FINAL; + + zval property_val_default_value; + ZVAL_UNDEF(&property_val_default_value); + zend_string *property_val_name = zend_string_init("val", sizeof("val") - 1, 1); + zend_declare_typed_property(class_entry, property_val_name, &property_val_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG|MAY_BE_DOUBLE)); + zend_string_release(property_val_name); + + return class_entry; +} diff --git a/ext/zend_test/test.c b/ext/zend_test/test.c index 85abf55522ac..b4ea2b27c9e9 100644 --- a/ext/zend_test/test.c +++ b/ext/zend_test/test.c @@ -24,6 +24,7 @@ #include "php_test.h" #include "observer.h" #include "fiber.h" +#include "object_handlers.h" #include "zend_attributes.h" #include "zend_enum.h" #include "zend_interfaces.h" @@ -860,220 +861,6 @@ static ZEND_METHOD(ZendTestForbidDynamicCall, callStatic) zend_forbid_dynamic_call(); } -/* donc refers to DoOperationNoCast */ -static zend_class_entry *donc_ce; -static zend_object_handlers donc_object_handlers; - -static zend_object* donc_object_create_ex(zend_class_entry* ce, zend_long l) { - zend_object *obj = zend_objects_new(ce); - object_properties_init(obj, ce); - obj->handlers = &donc_object_handlers; - ZVAL_LONG(OBJ_PROP_NUM(obj, 0), l); - return obj; -} -static zend_object *donc_object_create(zend_class_entry *ce) /* {{{ */ -{ - return donc_object_create_ex(ce, 0); -} -/* }}} */ - -static inline void donc_create(zval *target, zend_long l) /* {{{ */ -{ - ZVAL_OBJ(target, donc_object_create_ex(donc_ce, l)); -} - -#define IS_DONC(zval) \ - (Z_TYPE_P(zval) == IS_OBJECT && instanceof_function(Z_OBJCE_P(zval), donc_ce)) - -static void donc_add(zval *result, zval *op1, zval *op2) -{ - zend_long val_1; - zend_long val_2; - if (IS_DONC(op1)) { - val_1 = Z_LVAL_P(OBJ_PROP_NUM(Z_OBJ_P(op1), 0)); - } else { - val_1 = zval_get_long(op1); - } - if (IS_DONC(op2)) { - val_2 = Z_LVAL_P(OBJ_PROP_NUM(Z_OBJ_P(op2), 0)); - } else { - val_2 = zval_get_long(op2); - } - - donc_create(result, val_1 + val_2); -} -static void donc_mul(zval *result, zval *op1, zval *op2) -{ - zend_long val_1; - zend_long val_2; - if (IS_DONC(op1)) { - val_1 = Z_LVAL_P(OBJ_PROP_NUM(Z_OBJ_P(op1), 0)); - } else { - val_1 = zval_get_long(op1); - } - if (IS_DONC(op2)) { - val_2 = Z_LVAL_P(OBJ_PROP_NUM(Z_OBJ_P(op2), 0)); - } else { - val_2 = zval_get_long(op2); - } - - donc_create(result, val_1 * val_2); -} - -static zend_result donc_do_operation(zend_uchar opcode, zval *result, zval *op1, zval *op2) -{ - zval op1_copy; - zend_result status; - - if (result == op1) { - ZVAL_COPY_VALUE(&op1_copy, op1); - op1 = &op1_copy; - } - - switch (opcode) { - case ZEND_ADD: - donc_add(result, op1, op2); - if (UNEXPECTED(EG(exception))) { status = FAILURE; } - status = SUCCESS; - break; - case ZEND_MUL: - donc_mul(result, op1, op2); - if (UNEXPECTED(EG(exception))) { status = FAILURE; } - status = SUCCESS; - break; - default: - status = FAILURE; - break; - } - - if (status == SUCCESS && op1 == &op1_copy) { - zval_ptr_dtor(op1); - } - - return status; -} - -PHP_METHOD(DoOperationNoCast, __construct) -{ - zend_long l; - - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_LONG(l) - ZEND_PARSE_PARAMETERS_END(); - - ZVAL_LONG(OBJ_PROP_NUM(Z_OBJ_P(ZEND_THIS), 0), l); -} - -static zend_class_entry *long_castable_no_operation_ce; -static zend_object_handlers long_castable_no_operation_object_handlers; - -static zend_object* long_castable_no_operation_object_create_ex(zend_class_entry* ce, zend_long l) { - zend_object *obj = zend_objects_new(ce); - object_properties_init(obj, ce); - obj->handlers = &long_castable_no_operation_object_handlers; - ZVAL_LONG(OBJ_PROP_NUM(obj, 0), l); - return obj; -} - -static zend_object *long_castable_no_operation_object_create(zend_class_entry *ce) -{ - return long_castable_no_operation_object_create_ex(ce, 0); -} - -static zend_result long_castable_no_operation_cast_object(zend_object *obj, zval *result, int type) -{ - if (type == IS_LONG) { - ZVAL_COPY(result, OBJ_PROP_NUM(obj, 0)); - return SUCCESS; - } - return FAILURE; -} - -PHP_METHOD(LongCastableNoOperations, __construct) -{ - zend_long l; - - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_LONG(l) - ZEND_PARSE_PARAMETERS_END(); - - ZVAL_LONG(OBJ_PROP_NUM(Z_OBJ_P(ZEND_THIS), 0), l); -} - -static zend_class_entry *float_castable_no_operation_ce; -static zend_object_handlers float_castable_no_operation_object_handlers; - -static zend_object* float_castable_no_operation_object_create_ex(zend_class_entry* ce, double d) { - zend_object *obj = zend_objects_new(ce); - object_properties_init(obj, ce); - obj->handlers = &float_castable_no_operation_object_handlers; - ZVAL_DOUBLE(OBJ_PROP_NUM(obj, 0), d); - return obj; -} - -static zend_object *float_castable_no_operation_object_create(zend_class_entry *ce) -{ - return float_castable_no_operation_object_create_ex(ce, 0.0); -} - -static zend_result float_castable_no_operation_cast_object(zend_object *obj, zval *result, int type) -{ - if (type == IS_DOUBLE) { - ZVAL_COPY(result, OBJ_PROP_NUM(obj, 0)); - return SUCCESS; - } - return FAILURE; -} - -PHP_METHOD(FloatCastableNoOperations, __construct) -{ - double d; - - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_DOUBLE(d) - ZEND_PARSE_PARAMETERS_END(); - - ZVAL_DOUBLE(OBJ_PROP_NUM(Z_OBJ_P(ZEND_THIS), 0), d); -} - -static zend_class_entry *numeric_castable_no_operation_ce; -static zend_object_handlers numeric_castable_no_operation_object_handlers; - -static zend_object* numeric_castable_no_operation_object_create_ex(zend_class_entry* ce, const zval *n) { - zend_object *obj = zend_objects_new(ce); - object_properties_init(obj, ce); - obj->handlers = &numeric_castable_no_operation_object_handlers; - ZVAL_COPY(OBJ_PROP_NUM(obj, 0), n); - return obj; -} - -static zend_object *numeric_castable_no_operation_object_create(zend_class_entry *ce) -{ - zval tmp; - ZVAL_LONG(&tmp, 0); - return numeric_castable_no_operation_object_create_ex(ce, &tmp); -} - -static zend_result numeric_castable_no_operation_cast_object(zend_object *obj, zval *result, int type) -{ - if (type == _IS_NUMBER) { - ZVAL_COPY(result, OBJ_PROP_NUM(obj, 0)); - return SUCCESS; - } - return FAILURE; -} - -PHP_METHOD(NumericCastableNoOperations, __construct) -{ - zval *n; - - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_NUMBER(n) - ZEND_PARSE_PARAMETERS_END(); - - ZVAL_COPY(OBJ_PROP_NUM(Z_OBJ_P(ZEND_THIS), 0), n); -} - PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN("zend_test.replace_zend_execute_ex", "0", PHP_INI_SYSTEM, OnUpdateBool, replace_zend_execute_ex, zend_zend_test_globals, zend_test_globals) STD_PHP_INI_BOOLEAN("zend_test.register_passes", "0", PHP_INI_SYSTEM, OnUpdateBool, register_passes, zend_zend_test_globals, zend_test_globals) @@ -1140,28 +927,6 @@ PHP_MINIT_FUNCTION(zend_test) zend_test_string_enum = register_class_ZendTestStringEnum(); zend_test_int_enum = register_class_ZendTestIntEnum(); - /* DoOperationNoCast class */ - donc_ce = register_class_DoOperationNoCast(); - donc_ce->create_object = donc_object_create; - memcpy(&donc_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); - donc_object_handlers.do_operation = donc_do_operation; - - /* CastableNoOperation classes */ - long_castable_no_operation_ce = register_class_LongCastableNoOperations(); - long_castable_no_operation_ce->create_object = long_castable_no_operation_object_create; - memcpy(&long_castable_no_operation_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); - long_castable_no_operation_object_handlers.cast_object = long_castable_no_operation_cast_object; - - float_castable_no_operation_ce = register_class_FloatCastableNoOperations(); - float_castable_no_operation_ce->create_object = float_castable_no_operation_object_create; - memcpy(&float_castable_no_operation_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); - float_castable_no_operation_object_handlers.cast_object = float_castable_no_operation_cast_object; - - numeric_castable_no_operation_ce = register_class_NumericCastableNoOperations(); - numeric_castable_no_operation_ce->create_object = numeric_castable_no_operation_object_create; - memcpy(&numeric_castable_no_operation_object_handlers, &std_object_handlers, sizeof(zend_object_handlers)); - numeric_castable_no_operation_object_handlers.cast_object = numeric_castable_no_operation_cast_object; - zend_register_functions(NULL, ext_function_legacy, NULL, EG(current_module)->type); // Loading via dl() not supported with the observer API @@ -1183,6 +948,7 @@ PHP_MINIT_FUNCTION(zend_test) zend_test_observer_init(INIT_FUNC_ARGS_PASSTHRU); zend_test_fiber_init(); + zend_test_object_handlers_init(); le_throwing_resource = zend_register_list_destructors_ex(le_throwing_resource_dtor, NULL, "throwing resource", module_number); diff --git a/ext/zend_test/test.stub.php b/ext/zend_test/test.stub.php index 3cb9c7621d3c..e3905a99c72e 100644 --- a/ext/zend_test/test.stub.php +++ b/ext/zend_test/test.stub.php @@ -127,24 +127,6 @@ enum ZendTestIntEnum: int { case Baz = -1; } - final class DoOperationNoCast { - private int $val; - public function __construct(int $val) {} - } - - final class LongCastableNoOperations { - private int $val; - public function __construct(int $val) {} - } - final class FloatCastableNoOperations { - private float $val; - public function __construct(float $val) {} - } - final class NumericCastableNoOperations { - private int|float $val; - public function __construct(int|float $val) {} - } - function zend_test_array_return(): array {} function zend_test_nullable_array_return(): null|array {} diff --git a/ext/zend_test/test_arginfo.h b/ext/zend_test/test_arginfo.h index 255b1fd4a8d7..3a6a92798472 100644 --- a/ext/zend_test/test_arginfo.h +++ b/ext/zend_test/test_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3cfbf478e8c6bc52f97749161e35f9003097bb4c */ + * Stub hash: abd7a656256f9cf05466f09efcc78ef4c4c9f62b */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_zend_test_array_return, 0, 0, IS_ARRAY, 0) ZEND_END_ARG_INFO() @@ -193,20 +193,6 @@ ZEND_END_ARG_INFO() #define arginfo_class_ZendTestForbidDynamicCall_callStatic arginfo_zend_test_void_return -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DoOperationNoCast___construct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, val, IS_LONG, 0) -ZEND_END_ARG_INFO() - -#define arginfo_class_LongCastableNoOperations___construct arginfo_class_DoOperationNoCast___construct - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_FloatCastableNoOperations___construct, 0, 0, 1) - ZEND_ARG_TYPE_INFO(0, val, IS_DOUBLE, 0) -ZEND_END_ARG_INFO() - -ZEND_BEGIN_ARG_INFO_EX(arginfo_class_NumericCastableNoOperations___construct, 0, 0, 1) - ZEND_ARG_TYPE_MASK(0, val, MAY_BE_LONG|MAY_BE_DOUBLE, NULL) -ZEND_END_ARG_INFO() - #if (PHP_VERSION_ID >= 80100) ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_ZendTestNS_Foo_method, 0, 0, IS_LONG, 0) #else @@ -281,10 +267,6 @@ static ZEND_METHOD(ZendTestClassWithMethodWithParameterAttribute, override); static ZEND_METHOD(ZendTestChildClassWithMethodWithParameterAttribute, override); static ZEND_METHOD(ZendTestForbidDynamicCall, call); static ZEND_METHOD(ZendTestForbidDynamicCall, callStatic); -static ZEND_METHOD(DoOperationNoCast, __construct); -static ZEND_METHOD(LongCastableNoOperations, __construct); -static ZEND_METHOD(FloatCastableNoOperations, __construct); -static ZEND_METHOD(NumericCastableNoOperations, __construct); static ZEND_METHOD(ZendTestNS_Foo, method); static ZEND_METHOD(ZendTestNS_UnlikelyCompileError, method); static ZEND_METHOD(ZendTestNS2_Foo, method); @@ -426,30 +408,6 @@ static const zend_function_entry class_ZendTestIntEnum_methods[] = { }; -static const zend_function_entry class_DoOperationNoCast_methods[] = { - ZEND_ME(DoOperationNoCast, __construct, arginfo_class_DoOperationNoCast___construct, ZEND_ACC_PUBLIC) - ZEND_FE_END -}; - - -static const zend_function_entry class_LongCastableNoOperations_methods[] = { - ZEND_ME(LongCastableNoOperations, __construct, arginfo_class_LongCastableNoOperations___construct, ZEND_ACC_PUBLIC) - ZEND_FE_END -}; - - -static const zend_function_entry class_FloatCastableNoOperations_methods[] = { - ZEND_ME(FloatCastableNoOperations, __construct, arginfo_class_FloatCastableNoOperations___construct, ZEND_ACC_PUBLIC) - ZEND_FE_END -}; - - -static const zend_function_entry class_NumericCastableNoOperations_methods[] = { - ZEND_ME(NumericCastableNoOperations, __construct, arginfo_class_NumericCastableNoOperations___construct, ZEND_ACC_PUBLIC) - ZEND_FE_END -}; - - static const zend_function_entry class_ZendTestNS_Foo_methods[] = { ZEND_ME(ZendTestNS_Foo, method, arginfo_class_ZendTestNS_Foo_method, ZEND_ACC_PUBLIC) ZEND_FE_END @@ -822,74 +780,6 @@ static zend_class_entry *register_class_ZendTestIntEnum(void) } #endif -static zend_class_entry *register_class_DoOperationNoCast(void) -{ - zend_class_entry ce, *class_entry; - - INIT_CLASS_ENTRY(ce, "DoOperationNoCast", class_DoOperationNoCast_methods); - class_entry = zend_register_internal_class_ex(&ce, NULL); - class_entry->ce_flags |= ZEND_ACC_FINAL; - - zval property_val_default_value; - ZVAL_UNDEF(&property_val_default_value); - zend_string *property_val_name = zend_string_init("val", sizeof("val") - 1, 1); - zend_declare_typed_property(class_entry, property_val_name, &property_val_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); - zend_string_release(property_val_name); - - return class_entry; -} - -static zend_class_entry *register_class_LongCastableNoOperations(void) -{ - zend_class_entry ce, *class_entry; - - INIT_CLASS_ENTRY(ce, "LongCastableNoOperations", class_LongCastableNoOperations_methods); - class_entry = zend_register_internal_class_ex(&ce, NULL); - class_entry->ce_flags |= ZEND_ACC_FINAL; - - zval property_val_default_value; - ZVAL_UNDEF(&property_val_default_value); - zend_string *property_val_name = zend_string_init("val", sizeof("val") - 1, 1); - zend_declare_typed_property(class_entry, property_val_name, &property_val_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG)); - zend_string_release(property_val_name); - - return class_entry; -} - -static zend_class_entry *register_class_FloatCastableNoOperations(void) -{ - zend_class_entry ce, *class_entry; - - INIT_CLASS_ENTRY(ce, "FloatCastableNoOperations", class_FloatCastableNoOperations_methods); - class_entry = zend_register_internal_class_ex(&ce, NULL); - class_entry->ce_flags |= ZEND_ACC_FINAL; - - zval property_val_default_value; - ZVAL_UNDEF(&property_val_default_value); - zend_string *property_val_name = zend_string_init("val", sizeof("val") - 1, 1); - zend_declare_typed_property(class_entry, property_val_name, &property_val_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_DOUBLE)); - zend_string_release(property_val_name); - - return class_entry; -} - -static zend_class_entry *register_class_NumericCastableNoOperations(void) -{ - zend_class_entry ce, *class_entry; - - INIT_CLASS_ENTRY(ce, "NumericCastableNoOperations", class_NumericCastableNoOperations_methods); - class_entry = zend_register_internal_class_ex(&ce, NULL); - class_entry->ce_flags |= ZEND_ACC_FINAL; - - zval property_val_default_value; - ZVAL_UNDEF(&property_val_default_value); - zend_string *property_val_name = zend_string_init("val", sizeof("val") - 1, 1); - zend_declare_typed_property(class_entry, property_val_name, &property_val_default_value, ZEND_ACC_PRIVATE, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_LONG|MAY_BE_DOUBLE)); - zend_string_release(property_val_name); - - return class_entry; -} - static zend_class_entry *register_class_ZendTestNS_Foo(void) { zend_class_entry ce, *class_entry; From fa397e02174055806efbf94d2b280422047736ca Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 2 Aug 2023 20:03:03 +0200 Subject: [PATCH 062/120] Respect strict error setting for adoptNode --- ext/dom/document.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/dom/document.c b/ext/dom/document.c index 425895c32401..939c4aca0e06 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1063,7 +1063,7 @@ PHP_METHOD(DOMDocument, adoptNode) || nodep->type == XML_DTD_NODE || nodep->type == XML_ENTITY_NODE || nodep->type == XML_NOTATION_NODE)) { - php_dom_throw_error(NOT_SUPPORTED_ERR, true); + php_dom_throw_error(NOT_SUPPORTED_ERR, dom_get_strict_error(dom_object_nodep->document)); RETURN_THROWS(); } From 04df77650d6b5c3eaee5e7fdd4a2589ce2805203 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 2 Aug 2023 20:18:20 +0200 Subject: [PATCH 063/120] Deduplicate loading code --- ext/dom/document.c | 110 +++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 74 deletions(-) diff --git a/ext/dom/document.c b/ext/dom/document.c index 939c4aca0e06..c3c48ef02399 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1317,43 +1317,16 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t so } /* }}} */ -/* {{{ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) */ -static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) { - xmlDoc *docp = NULL, *newdoc; - dom_doc_propsptr doc_prop; - dom_object *intern; - char *source; - size_t source_len; - int refcount; - zend_long options = 0; - - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &source, &source_len, &options) == FAILURE) { - RETURN_THROWS(); - } - - if (!source_len) { - zend_argument_value_error(1, "must not be empty"); - RETURN_THROWS(); - } - if (ZEND_SIZE_T_INT_OVFL(source_len)) { - php_error_docref(NULL, E_WARNING, "Input string is too long"); - RETURN_FALSE; - } - if (ZEND_LONG_EXCEEDS_INT(options)) { - php_error_docref(NULL, E_WARNING, "Invalid options"); - RETURN_FALSE; - } - - newdoc = dom_document_parser(ZEND_THIS, mode, source, source_len, options); - +static void dom_finish_loading_document(zval *this, zval *return_value, xmlDocPtr newdoc) +{ if (!newdoc) RETURN_FALSE; - intern = Z_DOMOBJ_P(ZEND_THIS); + dom_object *intern = Z_DOMOBJ_P(this); size_t old_modification_nr = 0; if (intern != NULL) { - docp = (xmlDocPtr) dom_object_get_node(intern); - doc_prop = NULL; + xmlDocPtr docp = (xmlDocPtr) dom_object_get_node(intern); + dom_doc_propsptr doc_prop = NULL; if (docp != NULL) { const php_libxml_doc_ptr *doc_ptr = docp->_private; ZEND_ASSERT(doc_ptr != NULL); /* Must exist, we have a document */ @@ -1361,7 +1334,7 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) { php_libxml_decrement_node_ptr((php_libxml_node_object *) intern); doc_prop = intern->document->doc_props; intern->document->doc_props = NULL; - refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern); + int refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern); if (refcount != 0) { docp->_private = NULL; } @@ -1383,6 +1356,34 @@ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) { RETURN_TRUE; } + +/* {{{ static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) */ +static void dom_parse_document(INTERNAL_FUNCTION_PARAMETERS, int mode) { + char *source; + size_t source_len; + zend_long options = 0; + + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &source, &source_len, &options) == FAILURE) { + RETURN_THROWS(); + } + + if (!source_len) { + zend_argument_value_error(1, "must not be empty"); + RETURN_THROWS(); + } + if (ZEND_SIZE_T_INT_OVFL(source_len)) { + php_error_docref(NULL, E_WARNING, "Input string is too long"); + RETURN_FALSE; + } + if (ZEND_LONG_EXCEEDS_INT(options)) { + php_error_docref(NULL, E_WARNING, "Invalid options"); + RETURN_FALSE; + } + + xmlDocPtr newdoc = dom_document_parser(ZEND_THIS, mode, source, source_len, options); + + dom_finish_loading_document(ZEND_THIS, return_value, newdoc); +} /* }}} end dom_parser_document */ /* {{{ URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-load @@ -1869,12 +1870,8 @@ PHP_METHOD(DOMDocument, relaxNGValidateSource) static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ { - xmlDoc *docp = NULL, *newdoc; - dom_object *intern; - dom_doc_propsptr doc_prop; char *source; size_t source_len; - int refcount; zend_long options = 0; htmlParserCtxtPtr ctxt; @@ -1922,45 +1919,10 @@ static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ htmlCtxtUseOptions(ctxt, (int)options); } htmlParseDocument(ctxt); - newdoc = ctxt->myDoc; + xmlDocPtr newdoc = ctxt->myDoc; htmlFreeParserCtxt(ctxt); - if (!newdoc) - RETURN_FALSE; - - intern = Z_DOMOBJ_P(ZEND_THIS); - size_t old_modification_nr = 0; - if (intern != NULL) { - docp = (xmlDocPtr) dom_object_get_node(intern); - doc_prop = NULL; - if (docp != NULL) { - const php_libxml_doc_ptr *doc_ptr = docp->_private; - ZEND_ASSERT(doc_ptr != NULL); /* Must exist, we have a document */ - old_modification_nr = doc_ptr->cache_tag.modification_nr; - php_libxml_decrement_node_ptr((php_libxml_node_object *) intern); - doc_prop = intern->document->doc_props; - intern->document->doc_props = NULL; - refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern); - if (refcount != 0) { - docp->_private = NULL; - } - } - intern->document = NULL; - if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, newdoc) == -1) { - RETURN_FALSE; - } - intern->document->doc_props = doc_prop; - } - - php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)newdoc, (void *)intern); - /* Since iterators should invalidate, we need to start the modification number from the old counter */ - if (old_modification_nr != 0) { - php_libxml_doc_ptr* doc_ptr = (php_libxml_doc_ptr*) ((php_libxml_node_object*) intern)->node; /* downcast */ - doc_ptr->cache_tag.modification_nr = old_modification_nr; - php_libxml_invalidate_node_list_cache(doc_ptr); - } - - RETURN_TRUE; + dom_finish_loading_document(ZEND_THIS, return_value, newdoc); } /* }}} */ From 94127c53aabd13921814101dd05770d8c7f12b3b Mon Sep 17 00:00:00 2001 From: nielsdos <7771979+nielsdos@users.noreply.github.com> Date: Mon, 12 Jun 2023 23:42:11 +0200 Subject: [PATCH 064/120] Fix GH-11440: authentication to a sha256_password account fails over SSL This is similar to bug #78680, but that bug wasn't really fixed in all places. This is the only remaining place. Closes GH-11444. --- NEWS | 4 ++++ ext/mysqlnd/mysqlnd_auth.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 6ff509df6030..a63a367d1f57 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,10 @@ PHP NEWS - FFI: . Fix leaking definitions when using FFI::cdef()->new(...). (ilutov) +- MySQLnd: + . Fixed bug GH-11440 (authentication to a sha256_password account fails over + SSL). (nielsdos) + - Opcache: . Fixed bug GH-11715 (opcache.interned_strings_buffer either has no effect or opcache_get_status() / phpinfo() is wrong). (nielsdos) diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 421f4d082a3a..6956440abdc4 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -912,9 +912,12 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self if (conn->vio->data->ssl) { DBG_INF("simple clear text under SSL"); /* clear text under SSL */ - *auth_data_len = passwd_len; - ret = malloc(passwd_len); + /* NUL termination byte required: https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase_authentication_methods_clear_text_password.html + * (this is similar to bug #78680, but now as GH-11440) */ + *auth_data_len = passwd_len + 1; + ret = malloc(passwd_len + 1); memcpy(ret, passwd, passwd_len); + ret[passwd_len] = '\0'; } else { *auth_data_len = 0; server_public_key = mysqlnd_sha256_get_rsa_key(conn, session_options, pfc_data); From 6f6fedcb46a27cd3530f0babc9b03ce4598f9eab Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 2 Aug 2023 20:40:30 +0200 Subject: [PATCH 065/120] Handle strict error properly in adoptNode failure, and add a test --- ext/dom/document.c | 2 +- ext/dom/tests/DOMDocument_adoptNode.phpt | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ext/dom/document.c b/ext/dom/document.c index c3c48ef02399..03f8b2cbd79d 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1064,7 +1064,7 @@ PHP_METHOD(DOMDocument, adoptNode) || nodep->type == XML_ENTITY_NODE || nodep->type == XML_NOTATION_NODE)) { php_dom_throw_error(NOT_SUPPORTED_ERR, dom_get_strict_error(dom_object_nodep->document)); - RETURN_THROWS(); + RETURN_FALSE; } xmlDocPtr new_document; diff --git a/ext/dom/tests/DOMDocument_adoptNode.phpt b/ext/dom/tests/DOMDocument_adoptNode.phpt index fb99618d71ef..2382cabd5136 100644 --- a/ext/dom/tests/DOMDocument_adoptNode.phpt +++ b/ext/dom/tests/DOMDocument_adoptNode.phpt @@ -43,7 +43,7 @@ $adopted = $doc1->adoptNode($doc1->firstChild->firstChild); var_dump($adopted->textContent); var_dump($doc1->saveXML()); -echo "-- Adopt a document --\n"; +echo "-- Adopt a document (strict error on) --\n"; try { $doc1->adoptNode($doc1); @@ -51,6 +51,16 @@ try { echo $e->getMessage(), "\n"; } +echo "-- Adopt a document (strict error off) --\n"; + +$doc1->strictErrorChecking = false; +try { + $doc1->adoptNode($doc1); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} +$doc1->strictErrorChecking = true; + echo "-- Adopt an attribute --\n"; $doc3 = new DOMDocument(); @@ -102,7 +112,7 @@ unset($doc1); var_dump($child->nodeName); ?> ---EXPECT-- +--EXPECTF-- -- Owner document check before adopting -- bool(true) bool(false) @@ -127,8 +137,11 @@ string(5) "world" string(27) "

" --- Adopt a document -- +-- Adopt a document (strict error on) -- Not Supported Error +-- Adopt a document (strict error off) -- + +Warning: DOMDocument::adoptNode(): Not Supported Error in %s on line %d -- Adopt an attribute -- bool(true) bool(true) From ed27d70d9a42d0fd8cd4562c5222ceb9dce9425c Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 17 Jul 2023 22:30:10 +0200 Subject: [PATCH 066/120] Fix use-of-uninitialized-value in start_fake_frame Closes GH-11732 --- Zend/zend_execute_API.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 2dd05c24fc38..1e31934f1581 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -897,6 +897,8 @@ zend_result zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_ } if (UNEXPECTED(ZEND_CALL_INFO(call) & ZEND_CALL_MAY_HAVE_UNDEF)) { + /* zend_handle_undef_args assumes prev_execute_data is initialized. */ + call->prev_execute_data = NULL; if (zend_handle_undef_args(call) == FAILURE) { zend_vm_stack_free_args(call); zend_vm_stack_free_call_frame(call); From 958a25e22ebd25988dc67e2ab461278c8ff7819c Mon Sep 17 00:00:00 2001 From: Mikhail Galanin Date: Fri, 28 Jul 2023 19:01:12 +0100 Subject: [PATCH 067/120] Add "revalidate" time to opcache scripts list Closes GH-11816 --- UPGRADING | 5 +++++ ext/opcache/zend_accelerator_module.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/UPGRADING b/UPGRADING index d08bc9f0fd94..e30f94ad8f6f 100644 --- a/UPGRADING +++ b/UPGRADING @@ -108,6 +108,11 @@ PHP 8.3 UPGRADE NOTES - CLI . It is now possible to lint multiple files. +- Opcache + . opcache_get_status()['scripts'][n]['revalidate'] now contains a Unix + timestamp of when the next revalidation of the scripts timestamp is due, + dictated by the opcache.revalidate_freq INI directive. + - Posix . posix_getrlimit() now takes an optional $res parameter to allow fetching a single resource limit. diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c index dc0fa961d744..2c0ad63b48f3 100644 --- a/ext/opcache/zend_accelerator_module.c +++ b/ext/opcache/zend_accelerator_module.c @@ -616,6 +616,8 @@ static int accelerator_get_scripts(zval *return_value) timerclear(&exec_time); timerclear(&fetch_time); + add_assoc_long(&persistent_script_report, "revalidate", (zend_long)script->dynamic_members.revalidate); + zend_hash_update(Z_ARRVAL_P(return_value), cache_entry->key, &persistent_script_report); } } From 3148da8ee1d997a1494d5b478c0be22c5f1980fc Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 3 Aug 2023 10:08:41 +0200 Subject: [PATCH 068/120] Add block size support for tracked_malloc (#11856) This does still deviate from USE_ZEND_ALLOC=0 in that we're not rounding up the size of the allocation to fixed sizes. Doing so would suppress some out-of-bounds errors checked by ASAN. Rounding up the size in _zend_mm_block_size would not be good either as it would break code like memset(ptr, 0 _zend_mm_block_size(ptr)). --- Zend/zend_alloc.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 7e83f067a4f4..5dcf7ce5d711 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -2401,6 +2401,18 @@ void* ZEND_FASTCALL _zend_mm_realloc2(zend_mm_heap *heap, void *ptr, size_t size ZEND_API size_t ZEND_FASTCALL _zend_mm_block_size(zend_mm_heap *heap, void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) { +#if ZEND_MM_CUSTOM + if (UNEXPECTED(heap->use_custom_heap)) { + if (heap->custom_heap.std._malloc == tracked_malloc) { + zend_ulong h = ((uintptr_t) ptr) >> ZEND_MM_ALIGNMENT_LOG2; + zval *size_zv = zend_hash_index_find(heap->tracked_allocs, h); + if (size_zv) { + return Z_LVAL_P(size_zv); + } + } + return 0; + } +#endif return zend_mm_size(heap, ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); } @@ -2636,12 +2648,7 @@ ZEND_API void* ZEND_FASTCALL _erealloc2(void *ptr, size_t size, size_t copy_size ZEND_API size_t ZEND_FASTCALL _zend_mem_block_size(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) { -#if ZEND_MM_CUSTOM - if (UNEXPECTED(AG(mm_heap)->use_custom_heap)) { - return 0; - } -#endif - return zend_mm_size(AG(mm_heap), ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); + return _zend_mm_block_size(AG(mm_heap), ptr ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); } ZEND_API void* ZEND_FASTCALL _safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) From b80bebc278566a28573e2761669cd4fc0d5617a2 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 27 Jul 2023 16:26:50 +0200 Subject: [PATCH 069/120] Synchronize zend_jit_stop_counter_handlers() Avoid stopping counters repeatedly from different threads/processes. Fixes GH-11609 Closes GH-11806 --- NEWS | 3 +++ ext/opcache/ZendAccelerator.h | 1 + ext/opcache/jit/zend_jit_trace.c | 23 ++++++++++++++++------- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 3f38dedf9cbe..39edae4f2ca4 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.0beta3 +- Opcache: + . Avoid resetting JIT counter handlers from multiple processes/threads. + (ilutov) 03 Aug 2023, PHP 8.3.0beta2 diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h index 1aa1655f43eb..e958e8fd6506 100644 --- a/ext/opcache/ZendAccelerator.h +++ b/ext/opcache/ZendAccelerator.h @@ -261,6 +261,7 @@ typedef struct _zend_accel_shared_globals { LONGLONG restart_in; #endif bool restart_in_progress; + bool jit_counters_stopped; /* Preloading */ zend_persistent_script *preload_script; diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 6099730cd8db..ccff174c7df1 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -63,6 +63,7 @@ static int zend_jit_trace_startup(bool reattached) ZEND_JIT_EXIT_COUNTERS = 0; ZCSG(jit_traces) = zend_jit_traces; ZCSG(jit_exit_groups) = zend_jit_exit_groups; + ZCSG(jit_counters_stopped) = false; } else { zend_jit_traces = ZCSG(jit_traces); if (!zend_jit_traces) { @@ -7255,16 +7256,23 @@ static void zend_jit_stop_persistent_script(zend_persistent_script *script) /* Get all scripts which are accelerated by JIT */ static void zend_jit_stop_counter_handlers(void) { + if (ZCSG(jit_counters_stopped)) { + return; + } + zend_shared_alloc_lock(); /* mprotect has an extreme overhead, avoid calls to it for every function. */ SHM_UNPROTECT(); - for (uint32_t i = 0; i < ZCSG(hash).max_num_entries; i++) { - zend_accel_hash_entry *cache_entry; - for (cache_entry = ZCSG(hash).hash_table[i]; cache_entry; cache_entry = cache_entry->next) { - zend_persistent_script *script; - if (cache_entry->indirect) continue; - script = (zend_persistent_script *)cache_entry->data; - zend_jit_stop_persistent_script(script); + if (!ZCSG(jit_counters_stopped)) { + ZCSG(jit_counters_stopped) = true; + for (uint32_t i = 0; i < ZCSG(hash).max_num_entries; i++) { + zend_accel_hash_entry *cache_entry; + for (cache_entry = ZCSG(hash).hash_table[i]; cache_entry; cache_entry = cache_entry->next) { + zend_persistent_script *script; + if (cache_entry->indirect) continue; + script = (zend_persistent_script *)cache_entry->data; + zend_jit_stop_persistent_script(script); + } } } SHM_PROTECT(); @@ -8438,6 +8446,7 @@ static void zend_jit_trace_restart(void) ZEND_JIT_COUNTER_NUM = 0; ZEND_JIT_EXIT_NUM = 0; ZEND_JIT_EXIT_COUNTERS = 0; + ZCSG(jit_counters_stopped) = false; zend_jit_trace_init_caches(); } From 851890bd9c826af8a272a32976783daea679469e Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 3 Aug 2023 09:42:31 +0100 Subject: [PATCH 070/120] Import timelib 2022.09 --- ext/date/lib/parse_date.c | 211 +++++++++++++++++++------------------ ext/date/lib/parse_date.re | 3 +- ext/date/lib/timelib.h | 6 +- 3 files changed, 111 insertions(+), 109 deletions(-) diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index dbb61a2f1c0d..0b19c4fa4e99 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -1,4 +1,4 @@ -/* Generated by re2c 1.0.3 on Tue Jul 11 16:19:21 2023 */ +/* Generated by re2c 1.0.3 on Thu Aug 3 09:42:12 2023 */ #line 1 "ext/date/lib/parse_date.re" /* * The MIT License (MIT) @@ -676,7 +676,8 @@ static void timelib_eat_spaces(const char **ptr) *ptr += 2; continue; } - } while (false); + break; + } while (true); } static void timelib_eat_until_separator(const char **ptr) @@ -1002,11 +1003,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) std: s->tok = cursor; s->len = 0; -#line 1135 "ext/date/lib/parse_date.re" +#line 1136 "ext/date/lib/parse_date.re" -#line 1010 "" +#line 1011 "" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1187,23 +1188,23 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(2, *YYCURSOR); ++YYCURSOR; YYDEBUG(3, *YYCURSOR); -#line 1968 "ext/date/lib/parse_date.re" +#line 1969 "ext/date/lib/parse_date.re" { s->pos = cursor; s->line++; goto std; } -#line 1196 "" +#line 1197 "" yy4: YYDEBUG(4, *YYCURSOR); ++YYCURSOR; yy5: YYDEBUG(5, *YYCURSOR); -#line 1974 "ext/date/lib/parse_date.re" +#line 1975 "ext/date/lib/parse_date.re" { add_error(s, TIMELIB_ERR_UNEXPECTED_CHARACTER, "Unexpected character"); goto std; } -#line 1207 "" +#line 1208 "" yy6: YYDEBUG(6, *YYCURSOR); yyaccept = 0; @@ -1218,11 +1219,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy58; yy8: YYDEBUG(8, *YYCURSOR); -#line 1963 "ext/date/lib/parse_date.re" +#line 1964 "ext/date/lib/parse_date.re" { goto std; } -#line 1226 "" +#line 1227 "" yy9: YYDEBUG(9, *YYCURSOR); yych = *++YYCURSOR; @@ -1256,11 +1257,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(11, *YYCURSOR); ++YYCURSOR; YYDEBUG(12, *YYCURSOR); -#line 1958 "ext/date/lib/parse_date.re" +#line 1959 "ext/date/lib/parse_date.re" { goto std; } -#line 1264 "" +#line 1265 "" yy13: YYDEBUG(13, *YYCURSOR); yyaccept = 1; @@ -1761,7 +1762,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy20: YYDEBUG(20, *YYCURSOR); -#line 1873 "ext/date/lib/parse_date.re" +#line 1874 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("tzcorrection | tz"); @@ -1775,7 +1776,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_TIMEZONE; } -#line 1779 "" +#line 1780 "" yy21: YYDEBUG(21, *YYCURSOR); yych = *++YYCURSOR; @@ -3580,7 +3581,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy81: YYDEBUG(81, *YYCURSOR); -#line 1620 "ext/date/lib/parse_date.re" +#line 1621 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenoyearrev"); TIMELIB_INIT; @@ -3591,7 +3592,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 3595 "" +#line 3596 "" yy82: YYDEBUG(82, *YYCURSOR); yych = *++YYCURSOR; @@ -4106,7 +4107,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } if (yych == '.') goto yy289; YYDEBUG(114, *YYCURSOR); -#line 1195 "ext/date/lib/parse_date.re" +#line 1196 "ext/date/lib/parse_date.re" { timelib_ull i; @@ -4131,7 +4132,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 4135 "" +#line 4136 "" yy115: YYDEBUG(115, *YYCURSOR); ++YYCURSOR; @@ -5857,7 +5858,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy177: YYDEBUG(177, *YYCURSOR); -#line 1361 "ext/date/lib/parse_date.re" +#line 1362 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("timetiny24 | timeshort24 | timelong24 | iso8601long"); @@ -5884,7 +5885,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 5888 "" +#line 5889 "" yy178: YYDEBUG(178, *YYCURSOR); yyaccept = 4; @@ -6913,7 +6914,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy224: YYDEBUG(224, *YYCURSOR); -#line 1455 "ext/date/lib/parse_date.re" +#line 1456 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("americanshort | american"); @@ -6928,7 +6929,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_AMERICAN; } -#line 6932 "" +#line 6933 "" yy225: YYDEBUG(225, *YYCURSOR); yyaccept = 5; @@ -7171,7 +7172,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy431; yy251: YYDEBUG(251, *YYCURSOR); -#line 1537 "ext/date/lib/parse_date.re" +#line 1538 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datefull"); @@ -7185,7 +7186,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_FULL; } -#line 7189 "" +#line 7190 "" yy252: YYDEBUG(252, *YYCURSOR); yyaccept = 3; @@ -7299,7 +7300,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych == 'e') goto yy440; yy260: YYDEBUG(260, *YYCURSOR); -#line 1942 "ext/date/lib/parse_date.re" +#line 1943 "ext/date/lib/parse_date.re" { timelib_ull i; DEBUG_OUTPUT("relative"); @@ -7314,7 +7315,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 7318 "" +#line 7319 "" yy261: YYDEBUG(261, *YYCURSOR); yych = *++YYCURSOR; @@ -7760,7 +7761,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy471; yy290: YYDEBUG(290, *YYCURSOR); -#line 1221 "ext/date/lib/parse_date.re" +#line 1222 "ext/date/lib/parse_date.re" { timelib_sll i; timelib_ull us; @@ -7799,7 +7800,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 7803 "" +#line 7804 "" yy291: YYDEBUG(291, *YYCURSOR); yych = *++YYCURSOR; @@ -7824,7 +7825,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy293: YYDEBUG(293, *YYCURSOR); -#line 1783 "ext/date/lib/parse_date.re" +#line 1784 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("ago"); TIMELIB_INIT; @@ -7844,7 +7845,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_AGO; } -#line 7848 "" +#line 7849 "" yy294: YYDEBUG(294, *YYCURSOR); yyaccept = 7; @@ -7883,7 +7884,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy295: YYDEBUG(295, *YYCURSOR); -#line 1863 "ext/date/lib/parse_date.re" +#line 1864 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("monthtext"); TIMELIB_INIT; @@ -7892,7 +7893,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 7896 "" +#line 7897 "" yy296: YYDEBUG(296, *YYCURSOR); yyaccept = 7; @@ -8467,7 +8468,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy315: YYDEBUG(315, *YYCURSOR); -#line 1804 "ext/date/lib/parse_date.re" +#line 1805 "ext/date/lib/parse_date.re" { const timelib_relunit* relunit; DEBUG_OUTPUT("daytext"); @@ -8484,7 +8485,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_WEEKDAY; } -#line 8488 "" +#line 8489 "" yy316: YYDEBUG(316, *YYCURSOR); yych = *++YYCURSOR; @@ -8752,7 +8753,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy325: YYDEBUG(325, *YYCURSOR); -#line 1606 "ext/date/lib/parse_date.re" +#line 1607 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datetextual | datenoyear"); @@ -8765,7 +8766,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 8769 "" +#line 8770 "" yy326: YYDEBUG(326, *YYCURSOR); yyaccept = 10; @@ -9459,7 +9460,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy351: YYDEBUG(351, *YYCURSOR); -#line 1152 "ext/date/lib/parse_date.re" +#line 1153 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("now"); TIMELIB_INIT; @@ -9467,7 +9468,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 9471 "" +#line 9472 "" yy352: YYDEBUG(352, *YYCURSOR); yyaccept = 2; @@ -10970,7 +10971,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy420: YYDEBUG(420, *YYCURSOR); -#line 1389 "ext/date/lib/parse_date.re" +#line 1390 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("gnunocolon"); TIMELIB_INIT; @@ -10992,7 +10993,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_GNU_NOCOLON; } -#line 10996 "" +#line 10997 "" yy421: YYDEBUG(421, *YYCURSOR); yyaccept = 13; @@ -11073,7 +11074,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy422: YYDEBUG(422, *YYCURSOR); -#line 1774 "ext/date/lib/parse_date.re" +#line 1775 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("year4"); TIMELIB_INIT; @@ -11081,7 +11082,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 11085 "" +#line 11086 "" yy423: YYDEBUG(423, *YYCURSOR); yyaccept = 3; @@ -11688,7 +11689,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(456, *YYCURSOR); ++YYCURSOR; YYDEBUG(457, *YYCURSOR); -#line 1323 "ext/date/lib/parse_date.re" +#line 1324 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); TIMELIB_INIT; @@ -11705,7 +11706,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_TIME12; } -#line 11709 "" +#line 11710 "" yy458: YYDEBUG(458, *YYCURSOR); yych = *++YYCURSOR; @@ -13032,7 +13033,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy526: YYDEBUG(526, *YYCURSOR); -#line 1161 "ext/date/lib/parse_date.re" +#line 1162 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("noon"); TIMELIB_INIT; @@ -13043,7 +13044,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 13047 "" +#line 13048 "" yy527: YYDEBUG(527, *YYCURSOR); yyaccept = 2; @@ -14089,7 +14090,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy567: YYDEBUG(567, *YYCURSOR); -#line 1523 "ext/date/lib/parse_date.re" +#line 1524 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("gnudateshort"); @@ -14102,7 +14103,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 14106 "" +#line 14107 "" yy568: YYDEBUG(568, *YYCURSOR); yyaccept = 15; @@ -14553,7 +14554,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy600: YYDEBUG(600, *YYCURSOR); -#line 1592 "ext/date/lib/parse_date.re" +#line 1593 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datenodayrev"); @@ -14566,7 +14567,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 14570 "" +#line 14571 "" yy601: YYDEBUG(601, *YYCURSOR); yych = *++YYCURSOR; @@ -15941,7 +15942,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(696, *YYCURSOR); ++YYCURSOR; YYDEBUG(697, *YYCURSOR); -#line 1578 "ext/date/lib/parse_date.re" +#line 1579 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datenoday"); @@ -15954,7 +15955,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 15958 "" +#line 15959 "" yy698: YYDEBUG(698, *YYCURSOR); yych = *++YYCURSOR; @@ -16515,7 +16516,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy722: YYDEBUG(722, *YYCURSOR); -#line 1173 "ext/date/lib/parse_date.re" +#line 1174 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("midnight | today"); TIMELIB_INIT; @@ -16524,7 +16525,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 16528 "" +#line 16529 "" yy723: YYDEBUG(723, *YYCURSOR); yych = *++YYCURSOR; @@ -16834,7 +16835,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy897; yy739: YYDEBUG(739, *YYCURSOR); -#line 1564 "ext/date/lib/parse_date.re" +#line 1565 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pointed date YY"); @@ -16847,7 +16848,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 16851 "" +#line 16852 "" yy740: YYDEBUG(740, *YYCURSOR); yyaccept = 15; @@ -16959,7 +16960,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy752: YYDEBUG(752, *YYCURSOR); -#line 1509 "ext/date/lib/parse_date.re" +#line 1510 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("gnudateshorter"); @@ -16972,7 +16973,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 16976 "" +#line 16977 "" yy753: YYDEBUG(753, *YYCURSOR); yyaccept = 18; @@ -17221,7 +17222,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy777: YYDEBUG(777, *YYCURSOR); -#line 1435 "ext/date/lib/parse_date.re" +#line 1436 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("iso8601nocolon"); @@ -17240,7 +17241,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_NOCOLON; } -#line 17244 "" +#line 17245 "" yy778: YYDEBUG(778, *YYCURSOR); yyaccept = 19; @@ -18468,7 +18469,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy849: YYDEBUG(849, *YYCURSOR); -#line 1912 "ext/date/lib/parse_date.re" +#line 1913 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); @@ -18497,7 +18498,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 18501 "" +#line 18502 "" yy850: YYDEBUG(850, *YYCURSOR); yyaccept = 20; @@ -19541,7 +19542,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy926: YYDEBUG(926, *YYCURSOR); -#line 1670 "ext/date/lib/parse_date.re" +#line 1671 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgydotd"); @@ -19554,7 +19555,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_PG_YEARDAY; } -#line 19558 "" +#line 19559 "" yy927: YYDEBUG(927, *YYCURSOR); yyaccept = 21; @@ -19808,7 +19809,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '7') goto yy1059; yy942: YYDEBUG(942, *YYCURSOR); -#line 1703 "ext/date/lib/parse_date.re" +#line 1704 "ext/date/lib/parse_date.re" { timelib_sll w, d; DEBUG_OUTPUT("isoweek"); @@ -19826,7 +19827,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 19830 "" +#line 19831 "" yy943: YYDEBUG(943, *YYCURSOR); yych = *++YYCURSOR; @@ -20302,7 +20303,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych == 'e') goto yy1094; yy982: YYDEBUG(982, *YYCURSOR); -#line 1846 "ext/date/lib/parse_date.re" +#line 1847 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -20318,7 +20319,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 20322 "" +#line 20323 "" yy983: YYDEBUG(983, *YYCURSOR); yych = *++YYCURSOR; @@ -20665,7 +20666,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(1020, *YYCURSOR); ++YYCURSOR; YYDEBUG(1021, *YYCURSOR); -#line 1552 "ext/date/lib/parse_date.re" +#line 1553 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("pointed date YYYY"); TIMELIB_INIT; @@ -20676,7 +20677,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 20680 "" +#line 20681 "" yy1022: YYDEBUG(1022, *YYCURSOR); ++YYCURSOR; @@ -20705,7 +20706,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1025: YYDEBUG(1025, *YYCURSOR); -#line 1483 "ext/date/lib/parse_date.re" +#line 1484 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("iso8601date2"); @@ -20718,7 +20719,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 20722 "" +#line 20723 "" yy1026: YYDEBUG(1026, *YYCURSOR); yyaccept = 15; @@ -20938,7 +20939,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1043: YYDEBUG(1043, *YYCURSOR); -#line 1471 "ext/date/lib/parse_date.re" +#line 1472 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash"); TIMELIB_INIT; @@ -20949,7 +20950,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 20953 "" +#line 20954 "" yy1044: YYDEBUG(1044, *YYCURSOR); yyaccept = 26; @@ -21064,7 +21065,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1048: YYDEBUG(1048, *YYCURSOR); -#line 1632 "ext/date/lib/parse_date.re" +#line 1633 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenocolon"); TIMELIB_INIT; @@ -21075,7 +21076,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_DATE_NOCOLON; } -#line 21079 "" +#line 21080 "" yy1049: YYDEBUG(1049, *YYCURSOR); yych = *++YYCURSOR; @@ -21145,7 +21146,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(1059, *YYCURSOR); ++YYCURSOR; YYDEBUG(1060, *YYCURSOR); -#line 1684 "ext/date/lib/parse_date.re" +#line 1685 "ext/date/lib/parse_date.re" { timelib_sll w, d; DEBUG_OUTPUT("isoweekday"); @@ -21163,7 +21164,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 21167 "" +#line 21168 "" yy1061: YYDEBUG(1061, *YYCURSOR); yych = *++YYCURSOR; @@ -21226,7 +21227,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy1143; yy1070: YYDEBUG(1070, *YYCURSOR); -#line 1722 "ext/date/lib/parse_date.re" +#line 1723 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgtextshort"); @@ -21239,7 +21240,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 21243 "" +#line 21244 "" yy1071: YYDEBUG(1071, *YYCURSOR); yych = *++YYCURSOR; @@ -21712,7 +21713,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) ++YYCURSOR; yy1107: YYDEBUG(1107, *YYCURSOR); -#line 1183 "ext/date/lib/parse_date.re" +#line 1184 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("tomorrow"); TIMELIB_INIT; @@ -21723,7 +21724,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 21727 "" +#line 21728 "" yy1108: YYDEBUG(1108, *YYCURSOR); yyaccept = 28; @@ -22060,7 +22061,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(1140, *YYCURSOR); ++YYCURSOR; YYDEBUG(1141, *YYCURSOR); -#line 1736 "ext/date/lib/parse_date.re" +#line 1737 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgtextreverse"); @@ -22073,7 +22074,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 22077 "" +#line 22078 "" yy1142: YYDEBUG(1142, *YYCURSOR); ++YYCURSOR; @@ -22117,7 +22118,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1145: YYDEBUG(1145, *YYCURSOR); -#line 1278 "ext/date/lib/parse_date.re" +#line 1279 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("backof | frontof"); TIMELIB_INIT; @@ -22139,7 +22140,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_LF_DAY_OF_MONTH; } -#line 22143 "" +#line 22144 "" yy1146: YYDEBUG(1146, *YYCURSOR); yyaccept = 29; @@ -22463,7 +22464,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) } yy1172: YYDEBUG(1172, *YYCURSOR); -#line 1822 "ext/date/lib/parse_date.re" +#line 1823 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -22486,7 +22487,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 22490 "" +#line 22491 "" yy1173: YYDEBUG(1173, *YYCURSOR); yych = *++YYCURSOR; @@ -22498,7 +22499,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) ++YYCURSOR; yy1175: YYDEBUG(1175, *YYCURSOR); -#line 1140 "ext/date/lib/parse_date.re" +#line 1141 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("yesterday"); TIMELIB_INIT; @@ -22509,7 +22510,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 22513 "" +#line 22514 "" yy1176: YYDEBUG(1176, *YYCURSOR); yyaccept = 31; @@ -23002,7 +23003,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(1222, *YYCURSOR); ++YYCURSOR; YYDEBUG(1223, *YYCURSOR); -#line 1888 "ext/date/lib/parse_date.re" +#line 1889 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12"); TIMELIB_INIT; @@ -23025,7 +23026,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 23029 "" +#line 23030 "" yy1224: YYDEBUG(1224, *YYCURSOR); yych = *++YYCURSOR; @@ -23527,7 +23528,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(1268, *YYCURSOR); ++YYCURSOR; YYDEBUG(1269, *YYCURSOR); -#line 1301 "ext/date/lib/parse_date.re" +#line 1302 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -23548,7 +23549,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_WEEK_DAY_OF_MONTH; } -#line 23552 "" +#line 23553 "" yy1270: YYDEBUG(1270, *YYCURSOR); yyaccept = 24; @@ -23595,7 +23596,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(1273, *YYCURSOR); ++YYCURSOR; YYDEBUG(1274, *YYCURSOR); -#line 1261 "ext/date/lib/parse_date.re" +#line 1262 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("firstdayof | lastdayof"); TIMELIB_INIT; @@ -23611,12 +23612,12 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_LF_DAY_OF_MONTH; } -#line 23615 "" +#line 23616 "" yy1275: YYDEBUG(1275, *YYCURSOR); ++YYCURSOR; YYDEBUG(1276, *YYCURSOR); -#line 1497 "ext/date/lib/parse_date.re" +#line 1498 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("iso8601datex"); TIMELIB_INIT; @@ -23627,7 +23628,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 23631 "" +#line 23632 "" yy1277: YYDEBUG(1277, *YYCURSOR); yych = *++YYCURSOR; @@ -23730,7 +23731,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) YYDEBUG(1290, *YYCURSOR); ++YYCURSOR; YYDEBUG(1291, *YYCURSOR); -#line 1341 "ext/date/lib/parse_date.re" +#line 1342 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("mssqltime"); TIMELIB_INIT; @@ -23749,7 +23750,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 23753 "" +#line 23754 "" yy1292: YYDEBUG(1292, *YYCURSOR); yych = *++YYCURSOR; @@ -24173,7 +24174,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= '9') goto yy1331; yy1329: YYDEBUG(1329, *YYCURSOR); -#line 1644 "ext/date/lib/parse_date.re" +#line 1645 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif"); @@ -24198,7 +24199,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_XMLRPC_SOAP; } -#line 24202 "" +#line 24203 "" yy1330: YYDEBUG(1330, *YYCURSOR); yych = *++YYCURSOR; @@ -24568,7 +24569,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych <= ':') goto yy1383; yy1375: YYDEBUG(1375, *YYCURSOR); -#line 1750 "ext/date/lib/parse_date.re" +#line 1751 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("clf"); @@ -24591,7 +24592,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 24595 "" +#line 24596 "" yy1376: YYDEBUG(1376, *YYCURSOR); yyaccept = 33; @@ -24823,7 +24824,7 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) if (yych == ':') goto yy1286; goto yy1329; } -#line 1978 "ext/date/lib/parse_date.re" +#line 1979 "ext/date/lib/parse_date.re" } diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re index 8895c9bd0b21..3159ff7fa8ca 100644 --- a/ext/date/lib/parse_date.re +++ b/ext/date/lib/parse_date.re @@ -674,7 +674,8 @@ static void timelib_eat_spaces(const char **ptr) *ptr += 2; continue; } - } while (false); + break; + } while (true); } static void timelib_eat_until_separator(const char **ptr) diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h index 35253c426a7d..a532bf60356c 100644 --- a/ext/date/lib/timelib.h +++ b/ext/date/lib/timelib.h @@ -30,9 +30,9 @@ # include "timelib_config.h" #endif -#define TIMELIB_VERSION 202208 -#define TIMELIB_EXTENDED_VERSION 20220801 -#define TIMELIB_ASCII_VERSION "2022.08" +#define TIMELIB_VERSION 202209 +#define TIMELIB_EXTENDED_VERSION 20220901 +#define TIMELIB_ASCII_VERSION "2022.09" #include #include From a8f417165564b2bd5a057b9909f890699e39fd42 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 3 Aug 2023 09:52:34 +0100 Subject: [PATCH 071/120] Fixed bug GH-11854 (DateTime:createFromFormat stopped parsing datetime with extra space) --- NEWS | 4 ++++ ext/date/tests/gh11854.phpt | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ext/date/tests/gh11854.phpt diff --git a/NEWS b/NEWS index b1fc5b87ddfd..adde1de8b6c9 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,10 @@ PHP NEWS . Fixed bug GH-11716 (cli server crashes on SIGINT when compiled with ZEND_RC_DEBUG=1). (nielsdos) +- Date: + . Fixed bug GH-11854 (DateTime:createFromFormat stopped parsing datetime with + extra space). (nielsdos, Derick) + - DOM: . Fix DOMEntity field getter bugs. (nielsdos) . Fix incorrect attribute existence check in DOMElement::setAttributeNodeNS. diff --git a/ext/date/tests/gh11854.phpt b/ext/date/tests/gh11854.phpt new file mode 100644 index 000000000000..ddcce97d1ed1 --- /dev/null +++ b/ext/date/tests/gh11854.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug GH-11854 (DateTime:createFromFormat stopped parsing DateTime with extra space) +--INI-- +date.timezone=UTC +--FILE-- + +--EXPECTF-- +object(DateTime)#1 (3) { + ["date"]=> + string(26) "2023-08-02 08:37:50.000000" + ["timezone_type"]=> + int(3) + ["timezone"]=> + string(3) "UTC" +} From 120ae1719d8c92598e8d8112e7acc0e5b828d779 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 3 Aug 2023 12:33:32 +0200 Subject: [PATCH 072/120] Add typed specialization for ZEND_COUNT (#11825) --- Zend/zend_vm_def.h | 15 + Zend/zend_vm_execute.h | 241 ++++++----- Zend/zend_vm_handlers.h | 911 ++++++++++++++++++++-------------------- 3 files changed, 619 insertions(+), 548 deletions(-) diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 46f5ee566b14..51f35118d9de 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -9344,6 +9344,21 @@ ZEND_VM_COLD_CONST_HANDLER(190, ZEND_COUNT, CONST|TMPVAR|CV, UNUSED) ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } +ZEND_VM_TYPE_SPEC_HANDLER(ZEND_COUNT, (op1_info & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) == MAY_BE_ARRAY, ZEND_COUNT_ARRAY, CV|TMPVAR, UNUSED) +{ + USE_OPLINE + zend_array *ht = Z_ARRVAL_P(GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R)); + ZVAL_LONG(EX_VAR(opline->result.var), zend_hash_num_elements(ht)); + if (OP1_TYPE & (IS_TMP_VAR|IS_VAR) && !(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE) && !GC_DELREF(ht)) { + SAVE_OPLINE(); + zend_array_destroy(ht); + if (EG(exception)) { + HANDLE_EXCEPTION(); + } + } + ZEND_VM_NEXT_OPCODE(); +} + ZEND_VM_COLD_CONST_HANDLER(191, ZEND_GET_CLASS, UNUSED|CONST|TMPVAR|CV, UNUSED) { USE_OPLINE diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index cba0236ab5e4..de3457185f46 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -18216,6 +18216,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_TMPVAR_UNUSED_HANDL ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_ARRAY_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zend_array *ht = Z_ARRVAL_P(_get_zval_ptr_var(opline->op1.var EXECUTE_DATA_CC)); + ZVAL_LONG(EX_VAR(opline->result.var), zend_hash_num_elements(ht)); + if ((IS_TMP_VAR|IS_VAR) & (IS_TMP_VAR|IS_VAR) && !(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE) && !GC_DELREF(ht)) { + SAVE_OPLINE(); + zend_array_destroy(ht); + if (EG(exception)) { + HANDLE_EXCEPTION(); + } + } + ZEND_VM_NEXT_OPCODE(); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -49843,6 +49858,21 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_SPEC_CV_UNUSED_HANDLER(Z ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION(); } +static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_COUNT_ARRAY_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) +{ + USE_OPLINE + zend_array *ht = Z_ARRVAL_P(EX_VAR(opline->op1.var)); + ZVAL_LONG(EX_VAR(opline->result.var), zend_hash_num_elements(ht)); + if (IS_CV & (IS_TMP_VAR|IS_VAR) && !(GC_FLAGS(ht) & IS_ARRAY_IMMUTABLE) && !GC_DELREF(ht)) { + SAVE_OPLINE(); + zend_array_destroy(ht); + if (EG(exception)) { + HANDLE_EXCEPTION(); + } + } + ZEND_VM_NEXT_OPCODE(); +} + static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GET_CLASS_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { USE_OPLINE @@ -56006,6 +56036,11 @@ ZEND_API void execute_ex(zend_execute_data *ex) (void*)&&ZEND_CALLABLE_CONVERT_SPEC_UNUSED_UNUSED_LABEL, (void*)&&ZEND_BIND_INIT_STATIC_OR_JMP_SPEC_CV_LABEL, (void*)&&ZEND_RECV_NOTYPE_SPEC_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_COUNT_ARRAY_SPEC_TMPVAR_UNUSED_LABEL, + (void*)&&ZEND_COUNT_ARRAY_SPEC_TMPVAR_UNUSED_LABEL, + (void*)&&ZEND_NULL_LABEL, + (void*)&&ZEND_COUNT_ARRAY_SPEC_CV_UNUSED_LABEL, (void*)&&ZEND_JMP_FORWARD_SPEC_LABEL, (void*)&&ZEND_NULL_LABEL, (void*)&&ZEND_NULL_LABEL, @@ -58916,6 +58951,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_COUNT_SPEC_TMPVAR_UNUSED) ZEND_COUNT_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_COUNT_ARRAY_SPEC_TMPVAR_UNUSED): + VM_TRACE(ZEND_COUNT_ARRAY_SPEC_TMPVAR_UNUSED) + ZEND_COUNT_ARRAY_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED): VM_TRACE(ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED) ZEND_GET_CLASS_SPEC_TMPVAR_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -61238,6 +61277,10 @@ ZEND_API void execute_ex(zend_execute_data *ex) VM_TRACE(ZEND_COUNT_SPEC_CV_UNUSED) ZEND_COUNT_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); HYBRID_BREAK(); + HYBRID_CASE(ZEND_COUNT_ARRAY_SPEC_CV_UNUSED): + VM_TRACE(ZEND_COUNT_ARRAY_SPEC_CV_UNUSED) + ZEND_COUNT_ARRAY_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); + HYBRID_BREAK(); HYBRID_CASE(ZEND_GET_CLASS_SPEC_CV_UNUSED): VM_TRACE(ZEND_GET_CLASS_SPEC_CV_UNUSED) ZEND_GET_CLASS_SPEC_CV_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); @@ -64115,6 +64158,11 @@ void zend_vm_init(void) ZEND_CALLABLE_CONVERT_SPEC_UNUSED_UNUSED_HANDLER, ZEND_BIND_INIT_STATIC_OR_JMP_SPEC_CV_HANDLER, ZEND_RECV_NOTYPE_SPEC_HANDLER, + ZEND_NULL_HANDLER, + ZEND_COUNT_ARRAY_SPEC_TMPVAR_UNUSED_HANDLER, + ZEND_COUNT_ARRAY_SPEC_TMPVAR_UNUSED_HANDLER, + ZEND_NULL_HANDLER, + ZEND_COUNT_ARRAY_SPEC_CV_UNUSED_HANDLER, ZEND_JMP_FORWARD_SPEC_HANDLER, ZEND_NULL_HANDLER, ZEND_NULL_HANDLER, @@ -65065,7 +65113,7 @@ void zend_vm_init(void) 1255, 1256 | SPEC_RULE_OP1, 1261 | SPEC_RULE_OP1, - 3471, + 3476, 1266 | SPEC_RULE_OP1, 1271 | SPEC_RULE_OP1, 1276 | SPEC_RULE_OP2, @@ -65224,58 +65272,58 @@ void zend_vm_init(void) 2565, 2566, 2567, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, - 3471, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, + 3476, }; #if (ZEND_VM_KIND == ZEND_VM_KIND_HYBRID) zend_opcode_handler_funcs = labels; @@ -65448,7 +65496,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2570 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2575 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; if (op->op1_type < op->op2_type) { zend_swap_operands(op); } @@ -65456,7 +65504,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2595 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2600 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; if (op->op1_type < op->op2_type) { zend_swap_operands(op); } @@ -65464,7 +65512,7 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2620 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2625 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; if (op->op1_type < op->op2_type) { zend_swap_operands(op); } @@ -65475,17 +65523,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2645 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 2650 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } else if (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2670 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 2675 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2695 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 2700 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } break; case ZEND_MUL: @@ -65496,17 +65544,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2720 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2725 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2745 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2750 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2770 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 2775 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_IDENTICAL: @@ -65517,14 +65565,14 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2795 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2800 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2870 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2875 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op->op1_type == IS_CV && (op->op2_type & (IS_CONST|IS_CV)) && !(op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) && !(op2_info & (MAY_BE_UNDEF|MAY_BE_REF))) { - spec = 3095 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 3100 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_NOT_IDENTICAL: @@ -65535,14 +65583,14 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2945 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2950 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3020 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 3025 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op->op1_type == IS_CV && (op->op2_type & (IS_CONST|IS_CV)) && !(op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) && !(op2_info & (MAY_BE_UNDEF|MAY_BE_REF))) { - spec = 3100 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; + spec = 3105 | SPEC_RULE_OP2 | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_EQUAL: @@ -65553,12 +65601,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2795 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2800 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2870 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2875 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_NOT_EQUAL: @@ -65569,12 +65617,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 2945 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 2950 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3020 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; + spec = 3025 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH | SPEC_RULE_COMMUTATIVE; } break; case ZEND_IS_SMALLER: @@ -65582,12 +65630,12 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3105 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 3110 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3180 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 3185 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } break; case ZEND_IS_SMALLER_OR_EQUAL: @@ -65595,54 +65643,54 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3255 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 3260 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } else if (op1_info == MAY_BE_DOUBLE && op2_info == MAY_BE_DOUBLE) { if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3330 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; + spec = 3335 | SPEC_RULE_OP1 | SPEC_RULE_OP2 | SPEC_RULE_SMART_BRANCH; } break; case ZEND_QM_ASSIGN: if (op1_info == MAY_BE_LONG) { - spec = 3417 | SPEC_RULE_OP1; - } else if (op1_info == MAY_BE_DOUBLE) { spec = 3422 | SPEC_RULE_OP1; - } else if ((op->op1_type == IS_CONST) ? !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1)) : (!(op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE))))) { + } else if (op1_info == MAY_BE_DOUBLE) { spec = 3427 | SPEC_RULE_OP1; + } else if ((op->op1_type == IS_CONST) ? !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1)) : (!(op1_info & ((MAY_BE_ANY|MAY_BE_UNDEF)-(MAY_BE_NULL|MAY_BE_FALSE|MAY_BE_TRUE|MAY_BE_LONG|MAY_BE_DOUBLE))))) { + spec = 3432 | SPEC_RULE_OP1; } break; case ZEND_PRE_INC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3405 | SPEC_RULE_RETVAL; + spec = 3410 | SPEC_RULE_RETVAL; } else if (op1_info == MAY_BE_LONG) { - spec = 3407 | SPEC_RULE_RETVAL; + spec = 3412 | SPEC_RULE_RETVAL; } break; case ZEND_PRE_DEC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3409 | SPEC_RULE_RETVAL; + spec = 3414 | SPEC_RULE_RETVAL; } else if (op1_info == MAY_BE_LONG) { - spec = 3411 | SPEC_RULE_RETVAL; + spec = 3416 | SPEC_RULE_RETVAL; } break; case ZEND_POST_INC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3413; + spec = 3418; } else if (op1_info == MAY_BE_LONG) { - spec = 3414; + spec = 3419; } break; case ZEND_POST_DEC: if (res_info == MAY_BE_LONG && op1_info == MAY_BE_LONG) { - spec = 3415; + spec = 3420; } else if (op1_info == MAY_BE_LONG) { - spec = 3416; + spec = 3421; } break; case ZEND_JMP: if (OP_JMP_ADDR(op, op->op1) > op) { - spec = 2569; + spec = 2574; } break; case ZEND_RECV: @@ -65652,17 +65700,17 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t break; case ZEND_SEND_VAL: if (op->op1_type == IS_CONST && op->op2_type == IS_UNUSED && !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1))) { - spec = 3467; + spec = 3472; } break; case ZEND_SEND_VAR_EX: if (op->op2_type == IS_UNUSED && op->op2.num <= MAX_ARG_FLAG_NUM && (op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) == 0) { - spec = 3462 | SPEC_RULE_OP1; + spec = 3467 | SPEC_RULE_OP1; } break; case ZEND_FE_FETCH_R: if (op->op2_type == IS_CV && (op1_info & (MAY_BE_ANY|MAY_BE_REF)) == MAY_BE_ARRAY) { - spec = 3469 | SPEC_RULE_RETVAL; + spec = 3474 | SPEC_RULE_RETVAL; } break; case ZEND_FETCH_DIM_R: @@ -65670,17 +65718,22 @@ ZEND_API void ZEND_FASTCALL zend_vm_set_opcode_handler_ex(zend_op* op, uint32_t if (op->op1_type == IS_CONST && op->op2_type == IS_CONST) { break; } - spec = 3432 | SPEC_RULE_OP1 | SPEC_RULE_OP2; + spec = 3437 | SPEC_RULE_OP1 | SPEC_RULE_OP2; } break; case ZEND_SEND_VAL_EX: if (op->op2_type == IS_UNUSED && op->op2.num <= MAX_ARG_FLAG_NUM && op->op1_type == IS_CONST && !Z_REFCOUNTED_P(RT_CONSTANT(op, op->op1))) { - spec = 3468; + spec = 3473; } break; case ZEND_SEND_VAR: if (op->op2_type == IS_UNUSED && (op1_info & (MAY_BE_UNDEF|MAY_BE_REF)) == 0) { - spec = 3457 | SPEC_RULE_OP1; + spec = 3462 | SPEC_RULE_OP1; + } + break; + case ZEND_COUNT: + if ((op1_info & (MAY_BE_ANY|MAY_BE_UNDEF|MAY_BE_REF)) == MAY_BE_ARRAY) { + spec = 2569 | SPEC_RULE_OP1; } break; case ZEND_BW_OR: diff --git a/Zend/zend_vm_handlers.h b/Zend/zend_vm_handlers.h index 97dfeac30cae..400b5c606a88 100644 --- a/Zend/zend_vm_handlers.h +++ b/Zend/zend_vm_handlers.h @@ -1364,497 +1364,500 @@ _(2566, ZEND_CALLABLE_CONVERT_SPEC_UNUSED_UNUSED) \ _(2567, ZEND_BIND_INIT_STATIC_OR_JMP_SPEC_CV) \ _(2568, ZEND_RECV_NOTYPE_SPEC) \ - _(2569, ZEND_JMP_FORWARD_SPEC) \ - _(2575, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2576, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2577, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2579, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2570, ZEND_COUNT_ARRAY_SPEC_TMPVAR_UNUSED) \ + _(2571, ZEND_COUNT_ARRAY_SPEC_TMPVAR_UNUSED) \ + _(2573, ZEND_COUNT_ARRAY_SPEC_CV_UNUSED) \ + _(2574, ZEND_JMP_FORWARD_SPEC) \ _(2580, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ _(2581, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ _(2582, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ _(2584, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2590, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2591, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2592, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2594, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2600, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ - _(2601, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2602, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2604, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2585, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2586, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2587, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2589, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2595, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2596, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2597, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2599, ZEND_ADD_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ _(2605, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ _(2606, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ _(2607, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ _(2609, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2615, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ - _(2616, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2617, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2619, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2625, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2626, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2627, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2629, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2610, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ + _(2611, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2612, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2614, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2620, ZEND_ADD_LONG_SPEC_TMPVARCV_CONST) \ + _(2621, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2622, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2624, ZEND_ADD_LONG_SPEC_TMPVARCV_TMPVARCV) \ _(2630, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ _(2631, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ _(2632, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ _(2634, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2640, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2641, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2642, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2644, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2646, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ - _(2647, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ - _(2649, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ - _(2650, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2651, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2652, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2654, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2635, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2636, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2637, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2639, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2645, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2646, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2647, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2649, ZEND_ADD_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2651, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ + _(2652, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ + _(2654, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_CONST_TMPVARCV) \ _(2655, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ _(2656, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ _(2657, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ _(2659, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2665, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2666, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2667, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2669, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2671, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ - _(2672, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ - _(2674, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ - _(2675, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ - _(2676, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2677, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2679, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2660, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2661, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2662, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2664, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2670, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2671, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2672, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2674, ZEND_SUB_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2676, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ + _(2677, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ + _(2679, ZEND_SUB_LONG_SPEC_CONST_TMPVARCV) \ _(2680, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ _(2681, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ _(2682, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ _(2684, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2690, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ - _(2691, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2692, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2694, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2696, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2697, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2699, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(2700, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2701, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2702, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2704, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2685, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ + _(2686, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2687, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2689, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2695, ZEND_SUB_LONG_SPEC_TMPVARCV_CONST) \ + _(2696, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2697, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2699, ZEND_SUB_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2701, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2702, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(2704, ZEND_SUB_DOUBLE_SPEC_CONST_TMPVARCV) \ _(2705, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ _(2706, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ _(2707, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ _(2709, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2715, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2716, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2717, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2719, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2725, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2726, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2727, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2729, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2710, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2711, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2712, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2714, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2720, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2721, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2722, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2724, ZEND_SUB_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ _(2730, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ _(2731, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ _(2732, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ _(2734, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2740, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ - _(2741, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2742, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2744, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ - _(2750, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ - _(2751, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2752, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2754, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2735, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2736, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2737, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2739, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2745, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_CONST) \ + _(2746, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2747, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ + _(2749, ZEND_MUL_LONG_NO_OVERFLOW_SPEC_TMPVARCV_TMPVARCV) \ _(2755, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ _(2756, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ _(2757, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ _(2759, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2765, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ - _(2766, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2767, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2769, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2775, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2776, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2777, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2779, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2760, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ + _(2761, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2762, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2764, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2770, ZEND_MUL_LONG_SPEC_TMPVARCV_CONST) \ + _(2771, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2772, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2774, ZEND_MUL_LONG_SPEC_TMPVARCV_TMPVARCV) \ _(2780, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ _(2781, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ _(2782, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ _(2784, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2790, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2791, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2792, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2794, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2810, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2811, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2812, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2813, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2814, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2815, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2816, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2817, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2818, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2822, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2823, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2824, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2825, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2826, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2827, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2828, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2829, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2830, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2831, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2832, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2833, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2837, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2838, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2839, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2855, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2856, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2857, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2858, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2859, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2860, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2861, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2862, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2863, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2867, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2868, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2869, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2885, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2886, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2887, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2888, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2889, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2890, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2891, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2892, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2893, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2897, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2898, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2899, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2900, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2901, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2902, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2903, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2904, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2905, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2906, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2907, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2908, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2912, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2913, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2914, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2930, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(2931, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2932, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2933, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2934, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2935, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2936, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2937, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2938, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2942, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(2943, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2944, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2960, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2961, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2962, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2963, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2964, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2965, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2966, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2967, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2968, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2972, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2973, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2974, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2975, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(2976, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(2977, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(2978, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2979, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2980, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2981, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2982, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2983, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(2987, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(2988, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(2989, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3005, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(3006, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3007, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3008, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3009, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3010, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3011, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3012, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3013, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3017, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3018, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3019, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3035, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3036, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3037, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3038, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3039, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3040, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3041, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3042, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3043, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3047, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3048, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3049, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3050, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3051, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3052, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3053, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3054, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3055, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3056, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3057, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3058, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3062, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3063, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3064, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3080, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3081, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3082, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3083, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3084, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3085, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3086, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3087, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3088, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3092, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3093, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3094, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3095, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ - _(3099, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CV) \ - _(3100, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ - _(3104, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CV) \ - _(3108, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ - _(3109, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3110, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3111, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ - _(3112, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3113, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3117, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ - _(3118, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3119, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3120, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ - _(3121, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3122, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3123, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3124, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3125, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3126, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3127, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3128, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3132, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3133, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3134, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3135, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ - _(3136, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3137, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3138, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3139, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3140, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3141, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3142, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3143, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3147, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3148, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3149, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3165, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ - _(3166, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3167, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3168, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3169, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3170, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3171, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3172, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3173, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3177, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3178, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3179, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3183, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3184, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3185, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3186, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3187, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3188, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3192, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3193, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3194, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3195, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3196, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3197, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3198, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3199, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3200, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3201, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3202, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3203, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3207, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3208, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3209, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3210, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3211, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3212, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3213, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3214, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3215, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3216, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3217, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3218, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3222, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3223, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3224, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3240, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3241, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3242, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3243, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3244, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3245, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3246, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3247, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3248, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3252, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3253, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3254, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3258, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ - _(3259, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3260, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3261, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ - _(3262, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3263, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3267, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ - _(3268, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3269, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3270, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(3271, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3272, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3273, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3274, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3275, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3276, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3277, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3278, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3282, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3283, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3284, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3285, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(3286, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3287, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3288, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3289, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3290, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3291, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3292, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3293, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3297, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3298, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3299, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3315, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ - _(3316, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3317, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3318, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3319, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3320, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3321, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3322, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3323, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3327, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ - _(3328, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3329, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3333, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3334, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3335, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3336, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3337, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3338, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3342, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ - _(3343, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ - _(3344, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ - _(3345, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3346, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3347, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3348, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3349, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3350, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3351, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3352, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3353, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3357, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3358, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3359, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3360, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3361, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3362, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3363, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3364, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3365, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3366, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3367, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3368, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3372, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3373, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3374, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3390, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ - _(3391, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ - _(3392, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ - _(3393, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3394, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3395, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3396, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3397, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3398, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3402, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ - _(3403, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ - _(3404, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ - _(3405, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ - _(3406, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ - _(3407, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED) \ - _(3408, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED) \ - _(3409, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ - _(3410, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ - _(3411, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED) \ - _(3412, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED) \ - _(3413, ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV) \ - _(3414, ZEND_POST_INC_LONG_SPEC_CV) \ - _(3415, ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV) \ - _(3416, ZEND_POST_DEC_LONG_SPEC_CV) \ - _(3417, ZEND_QM_ASSIGN_LONG_SPEC_CONST) \ - _(3418, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ - _(3419, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ - _(3421, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ - _(3422, ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST) \ - _(3423, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ - _(3424, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ - _(3426, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ - _(3427, ZEND_QM_ASSIGN_NOREF_SPEC_CONST) \ - _(3428, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ - _(3429, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ - _(3431, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ - _(3433, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ - _(3434, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ - _(3436, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ - _(3437, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ - _(3438, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3439, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3441, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(2785, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2786, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2787, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2789, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2795, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2796, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2797, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2799, ZEND_MUL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2815, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2816, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2817, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2818, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2819, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2820, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2821, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2822, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2823, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2827, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2828, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2829, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2830, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2831, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2832, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2833, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2834, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2835, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2836, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2837, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2838, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2842, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2843, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2844, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2860, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2861, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2862, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2863, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2864, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2865, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2866, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2867, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2868, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2872, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2873, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2874, ZEND_IS_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2890, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2891, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2892, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2893, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2894, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2895, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2896, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2897, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2898, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2902, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2903, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2904, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2905, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2906, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2907, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2908, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2909, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2910, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2911, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2912, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2913, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2917, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2918, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2919, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2935, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(2936, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2937, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2938, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2939, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2940, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2941, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2942, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2943, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2947, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(2948, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2949, ZEND_IS_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2965, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2966, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2967, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2968, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2969, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2970, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2971, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2972, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2973, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2977, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2978, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2979, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2980, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(2981, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(2982, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(2983, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2984, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2985, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2986, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2987, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2988, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(2992, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(2993, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(2994, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3010, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3011, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3012, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3013, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3014, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3015, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3016, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3017, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3018, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3022, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3023, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3024, ZEND_IS_NOT_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3040, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3041, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3042, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3043, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3044, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3045, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3046, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3047, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3048, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3052, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3053, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3054, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3055, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3056, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3057, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3058, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3059, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3060, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3061, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3062, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3063, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3067, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3068, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3069, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3085, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3086, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3087, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3088, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3089, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3090, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3091, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3092, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3093, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3097, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3098, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3099, ZEND_IS_NOT_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3100, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ + _(3104, ZEND_IS_IDENTICAL_NOTHROW_SPEC_CV_CV) \ + _(3105, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CONST) \ + _(3109, ZEND_IS_NOT_IDENTICAL_NOTHROW_SPEC_CV_CV) \ + _(3113, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ + _(3114, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3115, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3116, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ + _(3117, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3118, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3122, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV) \ + _(3123, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3124, ZEND_IS_SMALLER_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3125, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ + _(3126, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3127, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3128, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3129, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3130, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3131, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3132, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3133, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3137, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3138, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3139, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3140, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ + _(3141, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3142, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3143, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3144, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3145, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3146, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3147, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3148, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3152, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3153, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3154, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3170, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST) \ + _(3171, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3172, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3173, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3174, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3175, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3176, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3177, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3178, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3182, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3183, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3184, ZEND_IS_SMALLER_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3188, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3189, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3190, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3191, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3192, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3193, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3197, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3198, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3199, ZEND_IS_SMALLER_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3200, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3201, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3202, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3203, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3204, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3205, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3206, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3207, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3208, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3212, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3213, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3214, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3215, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3216, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3217, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3218, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3219, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3220, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3221, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3222, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3223, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3227, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3228, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3229, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3245, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3246, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3247, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3248, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3249, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3250, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3251, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3252, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3253, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3257, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3258, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3259, ZEND_IS_SMALLER_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3263, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ + _(3264, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3265, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3266, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ + _(3267, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3268, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3272, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV) \ + _(3273, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3274, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3275, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3276, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3277, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3278, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3279, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3280, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3281, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3282, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3283, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3287, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3288, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3289, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3290, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3291, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3292, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3293, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3294, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3295, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3296, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3297, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3298, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3302, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3303, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3304, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3320, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST) \ + _(3321, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3322, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3323, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3324, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3325, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3326, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3327, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3328, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3332, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV) \ + _(3333, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3334, ZEND_IS_SMALLER_OR_EQUAL_LONG_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3338, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3339, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3340, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3341, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3342, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3343, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3347, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV) \ + _(3348, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPZ) \ + _(3349, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_CONST_TMPVARCV_JMPNZ) \ + _(3350, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3351, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3352, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3353, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3354, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3355, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3356, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3357, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3358, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3362, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3363, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3364, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3365, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3366, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3367, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3368, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3369, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3370, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3371, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3372, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3373, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3377, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3378, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3379, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3395, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST) \ + _(3396, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPZ) \ + _(3397, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_CONST_JMPNZ) \ + _(3398, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3399, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3400, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3401, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3402, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3403, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3407, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV) \ + _(3408, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPZ) \ + _(3409, ZEND_IS_SMALLER_OR_EQUAL_DOUBLE_SPEC_TMPVARCV_TMPVARCV_JMPNZ) \ + _(3410, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ + _(3411, ZEND_PRE_INC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ + _(3412, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_UNUSED) \ + _(3413, ZEND_PRE_INC_LONG_SPEC_CV_RETVAL_USED) \ + _(3414, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_UNUSED) \ + _(3415, ZEND_PRE_DEC_LONG_NO_OVERFLOW_SPEC_CV_RETVAL_USED) \ + _(3416, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_UNUSED) \ + _(3417, ZEND_PRE_DEC_LONG_SPEC_CV_RETVAL_USED) \ + _(3418, ZEND_POST_INC_LONG_NO_OVERFLOW_SPEC_CV) \ + _(3419, ZEND_POST_INC_LONG_SPEC_CV) \ + _(3420, ZEND_POST_DEC_LONG_NO_OVERFLOW_SPEC_CV) \ + _(3421, ZEND_POST_DEC_LONG_SPEC_CV) \ + _(3422, ZEND_QM_ASSIGN_LONG_SPEC_CONST) \ + _(3423, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ + _(3424, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ + _(3426, ZEND_QM_ASSIGN_LONG_SPEC_TMPVARCV) \ + _(3427, ZEND_QM_ASSIGN_DOUBLE_SPEC_CONST) \ + _(3428, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ + _(3429, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ + _(3431, ZEND_QM_ASSIGN_DOUBLE_SPEC_TMPVARCV) \ + _(3432, ZEND_QM_ASSIGN_NOREF_SPEC_CONST) \ + _(3433, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ + _(3434, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ + _(3436, ZEND_QM_ASSIGN_NOREF_SPEC_TMPVARCV) \ + _(3438, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ + _(3439, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ + _(3441, ZEND_FETCH_DIM_R_INDEX_SPEC_CONST_TMPVARCV) \ _(3442, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ _(3443, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ _(3444, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ _(3446, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ - _(3452, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_CONST) \ - _(3453, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ - _(3454, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ - _(3456, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ - _(3459, ZEND_SEND_VAR_SIMPLE_SPEC_VAR) \ - _(3461, ZEND_SEND_VAR_SIMPLE_SPEC_CV) \ - _(3464, ZEND_SEND_VAR_EX_SIMPLE_SPEC_VAR_UNUSED) \ - _(3466, ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV_UNUSED) \ - _(3467, ZEND_SEND_VAL_SIMPLE_SPEC_CONST) \ - _(3468, ZEND_SEND_VAL_EX_SIMPLE_SPEC_CONST) \ - _(3469, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED) \ - _(3470, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED) \ - _(3470+1, ZEND_NULL) + _(3447, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_CONST) \ + _(3448, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3449, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3451, ZEND_FETCH_DIM_R_INDEX_SPEC_TMPVAR_TMPVARCV) \ + _(3457, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_CONST) \ + _(3458, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ + _(3459, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ + _(3461, ZEND_FETCH_DIM_R_INDEX_SPEC_CV_TMPVARCV) \ + _(3464, ZEND_SEND_VAR_SIMPLE_SPEC_VAR) \ + _(3466, ZEND_SEND_VAR_SIMPLE_SPEC_CV) \ + _(3469, ZEND_SEND_VAR_EX_SIMPLE_SPEC_VAR_UNUSED) \ + _(3471, ZEND_SEND_VAR_EX_SIMPLE_SPEC_CV_UNUSED) \ + _(3472, ZEND_SEND_VAL_SIMPLE_SPEC_CONST) \ + _(3473, ZEND_SEND_VAL_EX_SIMPLE_SPEC_CONST) \ + _(3474, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_UNUSED) \ + _(3475, ZEND_FE_FETCH_R_SIMPLE_SPEC_VAR_CV_RETVAL_USED) \ + _(3475+1, ZEND_NULL) From dddcf920496787a04154369c61deacbffd8b0449 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Thu, 3 Aug 2023 15:13:01 +0300 Subject: [PATCH 073/120] [ci skip] Update NEWS --- NEWS | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index adde1de8b6c9..3685e0aac4c6 100644 --- a/NEWS +++ b/NEWS @@ -6,10 +6,6 @@ PHP NEWS . Fixed bug GH-11716 (cli server crashes on SIGINT when compiled with ZEND_RC_DEBUG=1). (nielsdos) -- Date: - . Fixed bug GH-11854 (DateTime:createFromFormat stopped parsing datetime with - extra space). (nielsdos, Derick) - - DOM: . Fix DOMEntity field getter bugs. (nielsdos) . Fix incorrect attribute existence check in DOMElement::setAttributeNodeNS. @@ -65,6 +61,8 @@ PHP NEWS . Fixed bug GH-11368 (Date modify returns invalid datetime). (Derick) . Fixed bug GH-11600 (Can't parse time strings which include (narrow) non-breaking space characters). (Derick) + . Fixed bug GH-11854 (DateTime:createFromFormat stopped parsing datetime with + extra space). (nielsdos, Derick) - DOM: . Fixed bug GH-11625 (DOMElement::replaceWith() doesn't replace node with From 73c5f36f5b7cfde189d8f72cfee4e3056d45f061 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 3 Aug 2023 15:28:19 +0200 Subject: [PATCH 074/120] Assert ptr_ptr value of TMP|CONST isn't used (#11865) We require valid code for compilation to succeed, but these paths should always be guarded by OPx_TYPE checks and never execute. Add an assertion to verify. --- Zend/zend_execute.h | 6 ++++++ Zend/zend_vm_execute.h | 40 ++++++++++++++++++++-------------------- Zend/zend_vm_gen.php | 36 ++++++++++++++++++------------------ 3 files changed, 44 insertions(+), 38 deletions(-) diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index f2cb6764788b..d0c18040ab46 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -523,6 +523,12 @@ ZEND_COLD void zend_magic_get_property_type_inconsistency_error(const zend_prope ZEND_COLD void zend_match_unhandled_error(const zval *value); +static zend_always_inline void *zend_get_bad_ptr(void) +{ + ZEND_UNREACHABLE(); + return NULL; +} + END_EXTERN_C() #endif /* ZEND_EXECUTE_H */ diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index de3457185f46..90f105f611e6 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -4491,7 +4491,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPE break; } - retval_ptr = NULL; + retval_ptr = zend_get_bad_ptr(); if (IS_CONST == IS_VAR) { ZEND_ASSERT(retval_ptr != &EG(uninitialized_zval)); @@ -5209,7 +5209,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_ SAVE_OPLINE(); if (IS_CONST == IS_VAR || IS_CONST == IS_CV) { - array_ref = array_ptr = NULL; + array_ref = array_ptr = zend_get_bad_ptr(); if (Z_ISREF_P(array_ref)) { array_ptr = Z_REFVAL_P(array_ref); } @@ -7313,7 +7313,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_C SAVE_OPLINE(); if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) { - expr_ptr = NULL; + expr_ptr = zend_get_bad_ptr(); if (Z_ISREF_P(expr_ptr)) { Z_ADDREF_P(expr_ptr); } else { @@ -7670,7 +7670,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CONST_HANDLER } } } else { - zval *value_ptr = NULL; + zval *value_ptr = zend_get_bad_ptr(); /* If a function call result is yielded and the function did * not return by reference we throw a notice. */ @@ -9644,7 +9644,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_T SAVE_OPLINE(); if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) { - expr_ptr = NULL; + expr_ptr = zend_get_bad_ptr(); if (Z_ISREF_P(expr_ptr)) { Z_ADDREF_P(expr_ptr); } else { @@ -9951,7 +9951,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_TMPVAR_HANDLE } } } else { - zval *value_ptr = NULL; + zval *value_ptr = zend_get_bad_ptr(); /* If a function call result is yielded and the function did * not return by reference we throw a notice. */ @@ -10567,7 +10567,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_U SAVE_OPLINE(); if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) { - expr_ptr = NULL; + expr_ptr = zend_get_bad_ptr(); if (Z_ISREF_P(expr_ptr)) { Z_ADDREF_P(expr_ptr); } else { @@ -10794,7 +10794,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_UNUSED_HANDLE } } } else { - zval *value_ptr = NULL; + zval *value_ptr = zend_get_bad_ptr(); /* If a function call result is yielded and the function did * not return by reference we throw a notice. */ @@ -12021,7 +12021,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_C SAVE_OPLINE(); if ((IS_CONST == IS_VAR || IS_CONST == IS_CV) && UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) { - expr_ptr = NULL; + expr_ptr = zend_get_bad_ptr(); if (Z_ISREF_P(expr_ptr)) { Z_ADDREF_P(expr_ptr); } else { @@ -12327,7 +12327,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_CONST_CV_HANDLER(ZE } } } else { - zval *value_ptr = NULL; + zval *value_ptr = zend_get_bad_ptr(); /* If a function call result is yielded and the function did * not return by reference we throw a notice. */ @@ -19293,7 +19293,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPEC_TMP_HANDLER break; } - retval_ptr = NULL; + retval_ptr = zend_get_bad_ptr(); if (IS_TMP_VAR == IS_VAR) { ZEND_ASSERT(retval_ptr != &EG(uninitialized_zval)); @@ -19560,7 +19560,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_FE_RESET_RW_SPEC_TMP_HANDLER(Z SAVE_OPLINE(); if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) { - array_ref = array_ptr = NULL; + array_ref = array_ptr = zend_get_bad_ptr(); if (Z_ISREF_P(array_ref)) { array_ptr = Z_REFVAL_P(array_ref); } @@ -20042,7 +20042,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CON SAVE_OPLINE(); if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) { - expr_ptr = NULL; + expr_ptr = zend_get_bad_ptr(); if (Z_ISREF_P(expr_ptr)) { Z_ADDREF_P(expr_ptr); } else { @@ -20186,7 +20186,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CONST_HANDLER(Z } } } else { - zval *value_ptr = NULL; + zval *value_ptr = zend_get_bad_ptr(); /* If a function call result is yielded and the function did * not return by reference we throw a notice. */ @@ -20486,7 +20486,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_TMP SAVE_OPLINE(); if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) { - expr_ptr = NULL; + expr_ptr = zend_get_bad_ptr(); if (Z_ISREF_P(expr_ptr)) { Z_ADDREF_P(expr_ptr); } else { @@ -20630,7 +20630,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_TMPVAR_HANDLER( } } } else { - zval *value_ptr = NULL; + zval *value_ptr = zend_get_bad_ptr(); /* If a function call result is yielded and the function did * not return by reference we throw a notice. */ @@ -20947,7 +20947,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_UNU SAVE_OPLINE(); if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) { - expr_ptr = NULL; + expr_ptr = zend_get_bad_ptr(); if (Z_ISREF_P(expr_ptr)) { Z_ADDREF_P(expr_ptr); } else { @@ -21091,7 +21091,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_UNUSED_HANDLER( } } } else { - zval *value_ptr = NULL; + zval *value_ptr = zend_get_bad_ptr(); /* If a function call result is yielded and the function did * not return by reference we throw a notice. */ @@ -21351,7 +21351,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_TMP_CV_ SAVE_OPLINE(); if ((IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) && UNEXPECTED(opline->extended_value & ZEND_ARRAY_ELEMENT_REF)) { - expr_ptr = NULL; + expr_ptr = zend_get_bad_ptr(); if (Z_ISREF_P(expr_ptr)) { Z_ADDREF_P(expr_ptr); } else { @@ -21495,7 +21495,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_YIELD_SPEC_TMP_CV_HANDLER(ZEND } } } else { - zval *value_ptr = NULL; + zval *value_ptr = zend_get_bad_ptr(); /* If a function call result is yielded and the function did * not return by reference we throw a notice. */ diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 0f6154c64db9..79b765387127 100755 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -232,9 +232,9 @@ $op1_get_zval_ptr_ptr = array( "ANY" => "get_zval_ptr_ptr(opline->op1_type, opline->op1, \\1)", - "TMP" => "NULL", + "TMP" => "zend_get_bad_ptr()", "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC)", - "CONST" => "NULL", + "CONST" => "zend_get_bad_ptr()", "UNUSED" => "NULL", "CV" => "_get_zval_ptr_cv_\\1(opline->op1.var EXECUTE_DATA_CC)", "TMPVAR" => "???", @@ -243,9 +243,9 @@ $op2_get_zval_ptr_ptr = array( "ANY" => "get_zval_ptr_ptr(opline->op2_type, opline->op2, \\1)", - "TMP" => "NULL", + "TMP" => "zend_get_bad_ptr()", "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var EXECUTE_DATA_CC)", - "CONST" => "NULL", + "CONST" => "zend_get_bad_ptr()", "UNUSED" => "NULL", "CV" => "_get_zval_ptr_cv_\\1(opline->op2.var EXECUTE_DATA_CC)", "TMPVAR" => "???", @@ -298,9 +298,9 @@ $op1_get_zval_ptr_ptr_undef = array( "ANY" => "get_zval_ptr_ptr_undef(opline->op1_type, opline->op1, \\1)", - "TMP" => "NULL", + "TMP" => "zend_get_bad_ptr()", "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC)", - "CONST" => "NULL", + "CONST" => "zend_get_bad_ptr()", "UNUSED" => "NULL", "CV" => "EX_VAR(opline->op1.var)", "TMPVAR" => "???", @@ -309,9 +309,9 @@ $op2_get_zval_ptr_ptr_undef = array( "ANY" => "get_zval_ptr_ptr_undef(opline->op2_type, opline->op2, \\1)", - "TMP" => "NULL", + "TMP" => "zend_get_bad_ptr()", "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var EXECUTE_DATA_CC)", - "CONST" => "NULL", + "CONST" => "zend_get_bad_ptr()", "UNUSED" => "NULL", "CV" => "EX_VAR(opline->op2.var)", "TMPVAR" => "???", @@ -386,9 +386,9 @@ $op1_get_obj_zval_ptr_ptr = array( "ANY" => "get_obj_zval_ptr_ptr(opline->op1_type, opline->op1, \\1)", - "TMP" => "NULL", + "TMP" => "zend_get_bad_ptr()", "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC)", - "CONST" => "NULL", + "CONST" => "zend_get_bad_ptr()", "UNUSED" => "&EX(This)", "CV" => "_get_zval_ptr_cv_\\1(opline->op1.var EXECUTE_DATA_CC)", "TMPVAR" => "???", @@ -397,9 +397,9 @@ $op2_get_obj_zval_ptr_ptr = array( "ANY" => "get_obj_zval_ptr_ptr(opline->op2_type, opline->op2, \\1)", - "TMP" => "NULL", + "TMP" => "zend_get_bad_ptr()", "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var EXECUTE_DATA_CC)", - "CONST" => "NULL", + "CONST" => "zend_get_bad_ptr()", "UNUSED" => "&EX(This)", "CV" => "_get_zval_ptr_cv_\\1(opline->op2.var EXECUTE_DATA_CC)", "TMPVAR" => "???", @@ -408,9 +408,9 @@ $op1_get_obj_zval_ptr_ptr_undef = array( "ANY" => "get_obj_zval_ptr_ptr(opline->op1_type, opline->op1, \\1)", - "TMP" => "NULL", + "TMP" => "zend_get_bad_ptr()", "VAR" => "_get_zval_ptr_ptr_var(opline->op1.var EXECUTE_DATA_CC)", - "CONST" => "NULL", + "CONST" => "zend_get_bad_ptr()", "UNUSED" => "&EX(This)", "CV" => "EX_VAR(opline->op1.var)", "TMPVAR" => "???", @@ -419,9 +419,9 @@ $op2_get_obj_zval_ptr_ptr_undef = array( "ANY" => "get_obj_zval_ptr_ptr(opline->op2_type, opline->op2, \\1)", - "TMP" => "NULL", + "TMP" => "zend_get_bad_ptr()", "VAR" => "_get_zval_ptr_ptr_var(opline->op2.var EXECUTE_DATA_CC)", - "CONST" => "NULL", + "CONST" => "zend_get_bad_ptr()", "UNUSED" => "&EX(This)", "CV" => "EX_VAR(opline->op2.var)", "TMPVAR" => "???", @@ -518,9 +518,9 @@ $op_data_get_zval_ptr_ptr = array( "ANY" => "get_zval_ptr_ptr((opline+1)->op1_type, (opline+1)->op1, \\1)", - "TMP" => "NULL", + "TMP" => "zend_get_bad_ptr()", "VAR" => "_get_zval_ptr_ptr_var((opline+1)->op1.var EXECUTE_DATA_CC)", - "CONST" => "NULL", + "CONST" => "zend_get_bad_ptr()", "UNUSED" => "NULL", "CV" => "_get_zval_ptr_cv_\\1((opline+1)->op1.var EXECUTE_DATA_CC)", "TMPVAR" => "???", From 269a9e18ecc87fc4e28702a5521d6d0476c41179 Mon Sep 17 00:00:00 2001 From: Ben Ramsey Date: Thu, 3 Aug 2023 12:03:16 -0500 Subject: [PATCH 075/120] PHP-8.0 is now for 8.0.31-dev --- NEWS | 10 +++++++--- Zend/zend.h | 2 +- configure.ac | 2 +- main/php_version.h | 6 +++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 1f694ae6e615..5587c9f38ae2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| -?? ??? ????, PHP 8.0.30 +?? ??? ????, PHP 8.0.31 + + + +03 Aug 2023, PHP 8.0.30 - Libxml: . Fixed bug GHSA-3qrf-m4j2-pcrr (Security issue with external entity loading @@ -22,7 +26,7 @@ PHP NEWS - Core: . Fixed bug #81744 (Password_verify() always return true with some hash). (CVE-2023-0567). (Tim Düsterhus) - . Fixed bug #81746 (1-byte array overrun in common path resolve code). + . Fixed bug #81746 (1-byte array overrun in common path resolve code). (CVE-2023-0568). (Niels Dossche) - SAPI: @@ -32,7 +36,7 @@ PHP NEWS 05 Jan 2023, PHP 8.0.27 - PDO/SQLite: - . Fixed bug #81740 (PDO::quote() may return unquoted string). (CVE-2022-31631) + . Fixed bug #81740 (PDO::quote() may return unquoted string). (CVE-2022-31631) (cmb) 24 Nov 2022, PHP 8.0.26 diff --git a/Zend/zend.h b/Zend/zend.h index 11bf4fc29f1a..8da9b6bc624a 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -20,7 +20,7 @@ #ifndef ZEND_H #define ZEND_H -#define ZEND_VERSION "4.0.27-dev" +#define ZEND_VERSION "4.0.31-dev" #define ZEND_ENGINE_3 diff --git a/configure.ac b/configure.ac index 23d46ae8d10a..35a175eb322e 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- AC_PREREQ([2.68]) -AC_INIT([PHP],[8.0.27-dev],[https://bugs.php.net],[php],[https://www.php.net]) +AC_INIT([PHP],[8.0.31-dev],[https://bugs.php.net],[php],[https://www.php.net]) AC_CONFIG_SRCDIR([main/php_version.h]) AC_CONFIG_AUX_DIR([build]) AC_PRESERVE_HELP_ORDER diff --git a/main/php_version.h b/main/php_version.h index 22111976ccb9..c58829e8b909 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.ac to change version number */ #define PHP_MAJOR_VERSION 8 #define PHP_MINOR_VERSION 0 -#define PHP_RELEASE_VERSION 27 +#define PHP_RELEASE_VERSION 31 #define PHP_EXTRA_VERSION "-dev" -#define PHP_VERSION "8.0.27-dev" -#define PHP_VERSION_ID 80027 +#define PHP_VERSION "8.0.31-dev" +#define PHP_VERSION_ID 80031 From 509906b2a5e6fc6075219fbf6bde9c9089121e79 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 12 Jun 2023 23:47:42 +0200 Subject: [PATCH 076/120] Fix GH-11438: mysqlnd fails to authenticate with sha256_password accounts using passwords longer than 19 characters https://dev.mysql.com/doc/dev/mysql-server/latest/page_caching_sha2_authentication_exchanges.html tells us that the nonce used in this authentication method is 20 bytes long. However, we might receive additional scramble data in php_mysqlnd_greet_read not used in this method. On my test setup, I received 21 bytes (20 bytes + '\0'). This resulted in the xor computation to incorrectly include the NUL byte. Every password of at least 20 characters therefore failed to authenticate using this method. Looking at mysql-server source code also seems to reveal that it always uses a fixed number of scramble bytes [1]. [1] https://github.com/mysql/mysql-server/blob/ea7087d885006918ad54458e7aad215b1650312c/sql/auth/sha2_password.cc#L1078-L1079 Closes GH-11445. Co-authored-by: Kamil Tekiela --- NEWS | 3 ++ ext/mysqli/tests/gh11438.phpt | 84 +++++++++++++++++++++++++++++++++++ ext/mysqlnd/mysqlnd_auth.c | 5 ++- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 ext/mysqli/tests/gh11438.phpt diff --git a/NEWS b/NEWS index a63a367d1f57..15202e9ad73f 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,9 @@ PHP NEWS - MySQLnd: . Fixed bug GH-11440 (authentication to a sha256_password account fails over SSL). (nielsdos) + . Fixed bug GH-11438 (mysqlnd fails to authenticate with sha256_password + accounts using passwords longer than 19 characters). + (nielsdos, Kamil Tekiela) - Opcache: . Fixed bug GH-11715 (opcache.interned_strings_buffer either has no effect or diff --git a/ext/mysqli/tests/gh11438.phpt b/ext/mysqli/tests/gh11438.phpt new file mode 100644 index 000000000000..49c715e72c03 --- /dev/null +++ b/ext/mysqli/tests/gh11438.phpt @@ -0,0 +1,84 @@ +--TEST-- +GH-11438 (mysqlnd fails to authenticate with sha256_password accounts using passwords longer than 19 characters) +--EXTENSIONS-- +mysqli +--SKIPIF-- +query("SHOW PLUGINS"))) { + die(sprintf("skip [%d] %s\n", $link->errno, $link->error)); +} + +$found = false; +while ($row = $res->fetch_assoc()) { + if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) { + $found = true; + break; + } +} +if (!$found) + die("skip SHA-256 server plugin unavailable"); + +// Ignore errors because this variable exists only in MySQL 5.6 and 5.7 +$link->query("SET @@session.old_passwords=2"); + +$link->query('DROP USER shatest'); +$link->query("DROP USER shatest@localhost"); + +if (!$link->query('CREATE USER shatest@"%" IDENTIFIED WITH sha256_password') || + !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) { + die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error)); +} + +// Password of length 52, more than twice the length of the scramble data to ensure scramble is repeated correctly +if (!$link->query('SET PASSWORD FOR shatest@"%" = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"') || + !$link->query('SET PASSWORD FOR shatest@"localhost" = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"')) { + die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error)); +} + +echo "nocache"; +?> +--FILE-- +connect_errno) { + printf("[001] [%d] %s\n", $link->connect_errno, $link->connect_error); +} else { + if (!$res = $link->query("SELECT USER()")) + printf("[002] [%d] %s\n", $link->errno, $link->error); + + if (!$row = mysqli_fetch_assoc($res)) { + printf("[003] [%d] %s\n", $link->errno, $link->error); + } + + if (!is_string($row['USER()']) || !str_starts_with($row['USER()'], 'shatest')) { + printf("[004] Expecting 1 got %s/'%s'", gettype($row['USER()']), $row['USER()']); + } +} + +print "done!"; +?> +--CLEAN-- +query('DROP USER shatest'); +$link->query('DROP USER shatest@localhost'); +?> +--EXPECTF-- +done! diff --git a/ext/mysqlnd/mysqlnd_auth.c b/ext/mysqlnd/mysqlnd_auth.c index 6956440abdc4..ea9755c982ed 100644 --- a/ext/mysqlnd/mysqlnd_auth.c +++ b/ext/mysqlnd/mysqlnd_auth.c @@ -927,7 +927,10 @@ mysqlnd_sha256_auth_get_auth_data(struct st_mysqlnd_authentication_plugin * self char *xor_str = do_alloca(passwd_len + 1, use_heap); memcpy(xor_str, passwd, passwd_len); xor_str[passwd_len] = '\0'; - mysqlnd_xor_string(xor_str, passwd_len, (char *) auth_plugin_data, auth_plugin_data_len); + /* https://dev.mysql.com/doc/dev/mysql-server/latest/page_caching_sha2_authentication_exchanges.html + * This tells us that the nonce is 20 (==SCRAMBLE_LENGTH) bytes long. + * In a 5.5+ server we might get additional scramble data in php_mysqlnd_greet_read, not used by this authentication method. */ + mysqlnd_xor_string(xor_str, passwd_len, (char *) auth_plugin_data, SCRAMBLE_LENGTH); ret = mysqlnd_sha256_public_encrypt(conn, server_public_key, passwd_len, auth_data_len, xor_str); free_alloca(xor_str, use_heap); } From 997a36750be6a82e727b1e10aa7fdddcdae70e76 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Wed, 2 Aug 2023 16:02:00 +0200 Subject: [PATCH 077/120] Fix GH-10964: Improve `man` page about the built-in server Closes GH-11857. --- NEWS | 2 ++ sapi/cli/php.1.in | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/NEWS b/NEWS index 15202e9ad73f..ac2bd020f771 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ PHP NEWS - CLI: . Fixed bug GH-11716 (cli server crashes on SIGINT when compiled with ZEND_RC_DEBUG=1). (nielsdos) + . Fixed bug GH-10964 (Improve man page about the built-in server). + (Alexandre Daubois) - DOM: . Fix DOMEntity field getter bugs. (nielsdos) diff --git a/sapi/cli/php.1.in b/sapi/cli/php.1.in index 98c8dc76f260..227e4f20edc0 100644 --- a/sapi/cli/php.1.in +++ b/sapi/cli/php.1.in @@ -92,6 +92,15 @@ point to a local address and port PHP will listen to HTTP requests on that addre .B docroot passed by the \-t option. .LP +If a PHP file is provided to the command line when the +built-in web server is used, it will be used as the router script. This script +will be started at each HTTP request. The script output is returned to the +browser, unless the router script returns the +.B false +value. If so, the built-in server falls back to the default behaviour, returning +the requested resource as-is by looking up the files relative to the document +root specified by the \-t option, if provided. +.LP If none of \-r \-f \-B \-R \-F \-E or \-S is present but a single parameter is given then this parameter is taken as the filename to parse and execute (same as with \-f). If no parameter is present then the standard input is read and From 162bd2a58a9417a9e19b835a2667b83f971deaa8 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 3 Aug 2023 21:11:55 +0200 Subject: [PATCH 078/120] Fix missing link variable in test --- ext/mysqli/tests/gh11438.phpt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/mysqli/tests/gh11438.phpt b/ext/mysqli/tests/gh11438.phpt index 49c715e72c03..56356811fc1e 100644 --- a/ext/mysqli/tests/gh11438.phpt +++ b/ext/mysqli/tests/gh11438.phpt @@ -77,6 +77,10 @@ print "done!"; --CLEAN-- query('DROP USER shatest'); $link->query('DROP USER shatest@localhost'); ?> From f7be15dbadca9e5410b936a9db291a23c22e26da Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Wed, 2 Aug 2023 21:08:52 +0200 Subject: [PATCH 079/120] Revert the fix for GH-11498 People relied on manually waiting for children, but the fix for GH-11498 broke this. Fixing this in PHP is fundamentally incompatible with doing the wait loop in userland. This reverts to the old behaviour. Closes GH-11863. --- NEWS | 4 ++ ext/pcntl/pcntl.c | 58 +++---------------- ...pt => waiting_on_sigchild_pcntl_wait.phpt} | 8 ++- 3 files changed, 17 insertions(+), 53 deletions(-) rename ext/pcntl/tests/{gh11498.phpt => waiting_on_sigchild_pcntl_wait.phpt} (79%) diff --git a/NEWS b/NEWS index ac2bd020f771..82b6f9858b48 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,10 @@ PHP NEWS . Avoid adding an unnecessary read-lock when loading script from shm if restart is in progress. (mikhainin) +- PCNTL: + . Revert behaviour of receiving SIGCHLD signals back to the behaviour + before 8.1.22. (nielsdos) + - Standard: . Prevent int overflow on $decimals in number_format. (Marc Bennewitz) diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 4eedbc574e5f..3ef19c96efac 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1338,68 +1338,26 @@ static void pcntl_signal_handler(int signo, siginfo_t *siginfo, void *context) static void pcntl_signal_handler(int signo) #endif { - struct php_pcntl_pending_signal *psig_first = PCNTL_G(spares); - if (!psig_first) { + struct php_pcntl_pending_signal *psig = PCNTL_G(spares); + if (!psig) { /* oops, too many signals for us to track, so we'll forget about this one */ return; } + PCNTL_G(spares) = psig->next; - struct php_pcntl_pending_signal *psig = NULL; - - /* Standard signals may be merged into a single one. - * POSIX specifies that SIGCHLD has the si_pid field (https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html), - * so we'll handle the merging for that signal. - * See also: https://www.gnu.org/software/libc/manual/html_node/Merged-Signals.html */ - if (signo == SIGCHLD) { - /* Note: The first waitpid result is not necessarily the pid that was passed above! - * We therefore cannot avoid the first waitpid() call. */ - int status; - pid_t pid; - while (true) { - do { - errno = 0; - /* Although Linux specifies that WNOHANG will never result in EINTR, POSIX doesn't say so: - * https://pubs.opengroup.org/onlinepubs/9699919799/functions/waitpid.html */ - pid = waitpid(-1, &status, WNOHANG | WUNTRACED); - } while (pid <= 0 && errno == EINTR); - if (pid <= 0) { - if (UNEXPECTED(!psig)) { - /* The child might've been consumed by another thread and will be handled there. */ - return; - } - break; - } - - psig = psig ? psig->next : psig_first; - psig->signo = signo; - -#ifdef HAVE_STRUCT_SIGINFO_T - psig->siginfo = *siginfo; - psig->siginfo.si_pid = pid; -#endif - - if (UNEXPECTED(!psig->next)) { - break; - } - } - } else { - psig = psig_first; - psig->signo = signo; + psig->signo = signo; + psig->next = NULL; #ifdef HAVE_STRUCT_SIGINFO_T - psig->siginfo = *siginfo; + psig->siginfo = *siginfo; #endif - } - - PCNTL_G(spares) = psig->next; - psig->next = NULL; /* the head check is important, as the tick handler cannot atomically clear both * the head and tail */ if (PCNTL_G(head) && PCNTL_G(tail)) { - PCNTL_G(tail)->next = psig_first; + PCNTL_G(tail)->next = psig; } else { - PCNTL_G(head) = psig_first; + PCNTL_G(head) = psig; } PCNTL_G(tail) = psig; PCNTL_G(pending_signals) = 1; diff --git a/ext/pcntl/tests/gh11498.phpt b/ext/pcntl/tests/waiting_on_sigchild_pcntl_wait.phpt similarity index 79% rename from ext/pcntl/tests/gh11498.phpt rename to ext/pcntl/tests/waiting_on_sigchild_pcntl_wait.phpt index 4a9f87a94d82..482888cfadd9 100644 --- a/ext/pcntl/tests/gh11498.phpt +++ b/ext/pcntl/tests/waiting_on_sigchild_pcntl_wait.phpt @@ -1,5 +1,5 @@ --TEST-- -GH-11498 (SIGCHLD is not always returned from proc_open) +Waiting on SIGCHLD with a pcntl_wait() loop --EXTENSIONS-- pcntl --SKIPIF-- @@ -14,8 +14,10 @@ $processes = []; pcntl_async_signals(true); pcntl_signal(SIGCHLD, function($sig, $info) use (&$processes) { - echo "SIGCHLD\n"; - unset($processes[$info['pid']]); + while (($pid = pcntl_wait($status, WUNTRACED | WNOHANG)) > 0) { + echo "SIGCHLD\n"; + unset($processes[$pid]); + } }, false); for ($i = 0; $i <= 5; $i++) { From e5b25900411febfded6830c5469611a1e260e9cc Mon Sep 17 00:00:00 2001 From: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com> Date: Fri, 4 Aug 2023 17:37:42 +0200 Subject: [PATCH 080/120] Improve database naming in `ext/pdo_pgsql` for better para-tests (#11872) --- ext/pdo_pgsql/tests/bug46274.phpt | 9 ++++--- ext/pdo_pgsql/tests/bug46274_2.phpt | 9 ++++--- ext/pdo_pgsql/tests/bug70861.phpt | 4 +-- ext/pdo_pgsql/tests/bug72633.phpt | 9 ++++--- ext/pdo_pgsql/tests/bug_33876.phpt | 11 ++++---- ext/pdo_pgsql/tests/bug_49985.phpt | 9 ++++--- ext/pdo_pgsql/tests/copy_from.phpt | 29 +++++++++++----------- ext/pdo_pgsql/tests/copy_to.phpt | 19 +++++++------- ext/pdo_pgsql/tests/is_in_transaction.phpt | 7 +++--- ext/pdo_pgsql/tests/large_objects.phpt | 11 ++++---- 10 files changed, 63 insertions(+), 54 deletions(-) diff --git a/ext/pdo_pgsql/tests/bug46274.phpt b/ext/pdo_pgsql/tests/bug46274.phpt index f35751f7a422..eef234c12076 100644 --- a/ext/pdo_pgsql/tests/bug46274.phpt +++ b/ext/pdo_pgsql/tests/bug46274.phpt @@ -21,9 +21,10 @@ try { } catch (Exception $e) { } -$db->query('CREATE TABLE test_one_blob (id SERIAL NOT NULL, blob1 BYTEA)'); +$db->query('DROP TABLE IF EXISTS test_one_blob_46274_1 CASCADE'); +$db->query('CREATE TABLE test_one_blob_46274_1 (id SERIAL NOT NULL, blob1 BYTEA)'); -$stmt = $db->prepare("INSERT INTO test_one_blob (blob1) VALUES (:foo)"); +$stmt = $db->prepare("INSERT INTO test_one_blob_46274_1 (blob1) VALUES (:foo)"); $data = 'foo'; $blob = fopen('php://memory', 'a'); @@ -49,7 +50,7 @@ $blob = NULL; $stmt->bindparam(':foo', $blob, PDO::PARAM_LOB); $stmt->execute(); -$res = $db->query("SELECT blob1 from test_one_blob"); +$res = $db->query("SELECT blob1 from test_one_blob_46274_1"); // Resource var_dump($res->fetch()); @@ -62,7 +63,7 @@ var_dump($res->fetch()); // NULL var_dump($res->fetch()); -$db->query('DROP TABLE test_one_blob'); +$db->query('DROP TABLE test_one_blob_46274_1'); ?> --EXPECT-- diff --git a/ext/pdo_pgsql/tests/bug46274_2.phpt b/ext/pdo_pgsql/tests/bug46274_2.phpt index 80e789773820..7a17e66b54d8 100644 --- a/ext/pdo_pgsql/tests/bug46274_2.phpt +++ b/ext/pdo_pgsql/tests/bug46274_2.phpt @@ -21,9 +21,10 @@ try { } catch (Exception $e) { } -$db->query('CREATE TABLE test_one_blob (id SERIAL NOT NULL, blob1 BYTEA)'); +$db->query('DROP TABLE IF EXISTS test_one_blob_46274_2 CASCADE'); +$db->query('CREATE TABLE test_one_blob_46274_2 (id SERIAL NOT NULL, blob1 BYTEA)'); -$stmt = $db->prepare("INSERT INTO test_one_blob (blob1) VALUES (:foo)"); +$stmt = $db->prepare("INSERT INTO test_one_blob_46274_2 (blob1) VALUES (:foo)"); $data = 'foo'; $blob = fopen('php://memory', 'a'); @@ -49,7 +50,7 @@ $blob = NULL; $stmt->bindparam(':foo', $blob, PDO::PARAM_LOB); $stmt->execute(); -$res = $db->query("SELECT blob1 from test_one_blob"); +$res = $db->query("SELECT blob1 from test_one_blob_46274_2"); // Resource var_dump($x = $res->fetch()); var_dump(fread($x['blob1'], 10)); @@ -65,7 +66,7 @@ var_dump(fread($x['blob1'], 10)); // NULL var_dump($res->fetch()); -$db->query('DROP TABLE test_one_blob'); +$db->query('DROP TABLE test_one_blob_46274_2'); ?> --EXPECTF-- diff --git a/ext/pdo_pgsql/tests/bug70861.phpt b/ext/pdo_pgsql/tests/bug70861.phpt index 678c3a464d62..5ac4f043a99d 100644 --- a/ext/pdo_pgsql/tests/bug70861.phpt +++ b/ext/pdo_pgsql/tests/bug70861.phpt @@ -21,8 +21,8 @@ try { } catch (Exception $e) { } -$db->query('DROP TABLE IF EXISTS test_blob_crash CASCADE'); -$db->query('CREATE TABLE test_blob_crash (id SERIAL NOT NULL, blob1 BYTEA)'); +$db->query('DROP TABLE IF EXISTS test_blob_crash_70861 CASCADE'); +$db->query('CREATE TABLE test_blob_crash_70861 (id SERIAL NOT NULL, blob1 BYTEA)'); class HelloWrapper { public function stream_open() { return true; } diff --git a/ext/pdo_pgsql/tests/bug72633.phpt b/ext/pdo_pgsql/tests/bug72633.phpt index 97ffc3715bbc..2d8c5683f127 100644 --- a/ext/pdo_pgsql/tests/bug72633.phpt +++ b/ext/pdo_pgsql/tests/bug72633.phpt @@ -18,9 +18,10 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); -$db->query('CREATE TABLE test_last_id (id SERIAL NOT NULL, field1 VARCHAR(10))'); +$db->query('DROP TABLE IF EXISTS test_last_id_72633 CASCADE'); +$db->query('CREATE TABLE test_last_id_72633 (id SERIAL NOT NULL, field1 VARCHAR(10))'); -$stmt = $db->prepare("INSERT INTO test_last_id (field1) VALUES ('test')"); +$stmt = $db->prepare("INSERT INTO test_last_id_72633 (field1) VALUES ('test')"); $stmt->execute(); @@ -31,9 +32,9 @@ var_dump($db->lastInsertId()); /** * Sequence name informed */ -var_dump($db->lastInsertId('test_last_id_id_seq')); +var_dump($db->lastInsertId('test_last_id_72633_id_seq')); -$db->query('DROP TABLE test_last_id'); +$db->query('DROP TABLE test_last_id_72633'); ?> --EXPECTREGEX-- diff --git a/ext/pdo_pgsql/tests/bug_33876.phpt b/ext/pdo_pgsql/tests/bug_33876.phpt index f210b045f61b..1a1842ee2340 100644 --- a/ext/pdo_pgsql/tests/bug_33876.phpt +++ b/ext/pdo_pgsql/tests/bug_33876.phpt @@ -16,11 +16,12 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); $db->exec("SET LC_MESSAGES='C'"); -$db->exec('CREATE TABLE test (foo varchar(5) NOT NULL, bar bool NOT NULL)'); -$db->exec("INSERT INTO test VALUES('false','f')"); -$db->exec("INSERT INTO test VALUES('true', 't')"); +$db->query('DROP TABLE IF EXISTS b33876 CASCADE'); +$db->exec('CREATE TABLE b33876 (foo varchar(5) NOT NULL, bar bool NOT NULL)'); +$db->exec("INSERT INTO b33876 VALUES('false','f')"); +$db->exec("INSERT INTO b33876 VALUES('true', 't')"); -$res = $db->prepare('SELECT foo from test where bar = ?'); +$res = $db->prepare('SELECT foo from b33876 where bar = ?'); # this is the portable approach to binding a bool $res->bindValue(1, false, PDO::PARAM_BOOL); @@ -55,7 +56,7 @@ else echo "EMUL\n"; -$res = $db->prepare('SELECT foo from test where bar = ?', array( +$res = $db->prepare('SELECT foo from b33876 where bar = ?', array( PDO::ATTR_EMULATE_PREPARES => true)); # this is the portable approach to binding a bool diff --git a/ext/pdo_pgsql/tests/bug_49985.phpt b/ext/pdo_pgsql/tests/bug_49985.phpt index 29d74b72e4c7..870e69e02ffe 100644 --- a/ext/pdo_pgsql/tests/bug_49985.phpt +++ b/ext/pdo_pgsql/tests/bug_49985.phpt @@ -15,12 +15,13 @@ require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); -$db->exec("CREATE TABLE test (a int PRIMARY KEY)"); +$db->query('DROP TABLE IF EXISTS b49985 CASCADE'); +$db->exec("CREATE TABLE b49985 (a int PRIMARY KEY)"); for ($i = 0; $i < 3; $i++) { try { $db->beginTransaction(); - $stmt = $db->prepare("INSERT INTO test (a) VALUES (?)"); + $stmt = $db->prepare("INSERT INTO b49985 (a) VALUES (?)"); var_dump($stmt->execute(array(1))); $db->commit(); } catch (Exception $e) { @@ -32,5 +33,5 @@ for ($i = 0; $i < 3; $i++) { ?> --EXPECTF-- bool(true) -SQLSTATE[23505]: %stest_pkey%s -SQLSTATE[23505]: %stest_pkey%s +SQLSTATE[23505]: %sb49985_pkey%s +SQLSTATE[23505]: %sb49985_pkey%s diff --git a/ext/pdo_pgsql/tests/copy_from.phpt b/ext/pdo_pgsql/tests/copy_from.phpt index 967d6319553a..65669dfd78ed 100644 --- a/ext/pdo_pgsql/tests/copy_from.phpt +++ b/ext/pdo_pgsql/tests/copy_from.phpt @@ -16,7 +16,8 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); -$db->exec('CREATE TABLE test (a integer not null primary key, b text, c integer)'); +$db->query('DROP TABLE IF EXISTS test_copy_from CASCADE'); +$db->exec('CREATE TABLE test_copy_from (a integer not null primary key, b text, c integer)'); echo "Preparing test file and array for CopyFrom tests\n"; @@ -40,9 +41,9 @@ file_put_contents($filenameWithDifferentNullValuesAndSelectedFields, implode("\n echo "Testing pgsqlCopyFromArray() with default parameters\n"; $db->beginTransaction(); -var_dump($db->pgsqlCopyFromArray('test',$tableRows)); +var_dump($db->pgsqlCopyFromArray('test_copy_from',$tableRows)); -$stmt = $db->query("select * from test"); +$stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } @@ -50,8 +51,8 @@ $db->rollback(); echo "Testing pgsqlCopyFromArray() with different field separator and not null indicator\n"; $db->beginTransaction(); -var_dump($db->pgsqlCopyFromArray('test',$tableRowsWithDifferentNullValues,";","NULL")); -$stmt = $db->query("select * from test"); +var_dump($db->pgsqlCopyFromArray('test_copy_from',$tableRowsWithDifferentNullValues,";","NULL")); +$stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } @@ -59,8 +60,8 @@ $db->rollback(); echo "Testing pgsqlCopyFromArray() with only selected fields\n"; $db->beginTransaction(); -var_dump($db->pgsqlCopyFromArray('test',$tableRowsWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); -$stmt = $db->query("select * from test"); +var_dump($db->pgsqlCopyFromArray('test_copy_from',$tableRowsWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); +$stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } @@ -77,9 +78,9 @@ $db->rollback(); echo "Testing pgsqlCopyFromFile() with default parameters\n"; $db->beginTransaction(); -var_dump($db->pgsqlCopyFromFile('test',$filename)); +var_dump($db->pgsqlCopyFromFile('test_copy_from',$filename)); -$stmt = $db->query("select * from test"); +$stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } @@ -87,8 +88,8 @@ $db->rollback(); echo "Testing pgsqlCopyFromFile() with different field separator and not null indicator\n"; $db->beginTransaction(); -var_dump($db->pgsqlCopyFromFile('test',$filenameWithDifferentNullValues,";","NULL")); -$stmt = $db->query("select * from test"); +var_dump($db->pgsqlCopyFromFile('test_copy_from',$filenameWithDifferentNullValues,";","NULL")); +$stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } @@ -96,8 +97,8 @@ $db->rollback(); echo "Testing pgsqlCopyFromFile() with only selected fields\n"; $db->beginTransaction(); -var_dump($db->pgsqlCopyFromFile('test',$filenameWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); -$stmt = $db->query("select * from test"); +var_dump($db->pgsqlCopyFromFile('test_copy_from',$filenameWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); +$stmt = $db->query("select * from test_copy_from"); foreach($stmt as $r) { var_dump($r); } @@ -115,7 +116,7 @@ $db->rollback(); echo "Testing pgsqlCopyFromFile() with non existing file\n"; $db->beginTransaction(); try { - var_dump($db->pgsqlCopyFromFile('test',"nonexisting/foo.csv",";","NULL",'a,c')); + var_dump($db->pgsqlCopyFromFile('test_copy_from',"nonexisting/foo.csv",";","NULL",'a,c')); } catch (Exception $e) { echo "Exception: {$e->getMessage()}\n"; } diff --git a/ext/pdo_pgsql/tests/copy_to.phpt b/ext/pdo_pgsql/tests/copy_to.phpt index 979aca586a5e..f0e0bdf0f5bb 100644 --- a/ext/pdo_pgsql/tests/copy_to.phpt +++ b/ext/pdo_pgsql/tests/copy_to.phpt @@ -16,12 +16,13 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); -$db->exec('CREATE TABLE test (a integer not null primary key, b text, c integer)'); +$db->query('DROP TABLE IF EXISTS test_copy_to CASCADE'); +$db->exec('CREATE TABLE test_copy_to (a integer not null primary key, b text, c integer)'); $db->beginTransaction(); echo "Preparing test table for CopyTo tests\n"; -$stmt = $db->prepare("INSERT INTO test (a, b, c) values (?, ?, ?)"); +$stmt = $db->prepare("INSERT INTO test_copy_to (a, b, c) values (?, ?, ?)"); for($i=0;$i<3;$i++) { $firstParameter = $i; @@ -36,11 +37,11 @@ for($i=0;$i<3;$i++) { $db->commit(); echo "Testing pgsqlCopyToArray() with default parameters\n"; -var_dump($db->pgsqlCopyToArray('test')); +var_dump($db->pgsqlCopyToArray('test_copy_to')); echo "Testing pgsqlCopyToArray() with different field separator and not null indicator\n"; -var_dump($db->pgsqlCopyToArray('test',";","NULL")); +var_dump($db->pgsqlCopyToArray('test_copy_to',";","NULL")); echo "Testing pgsqlCopyToArray() with only selected fields\n"; -var_dump($db->pgsqlCopyToArray('test',";","NULL",'a,c')); +var_dump($db->pgsqlCopyToArray('test_copy_to',";","NULL",'a,c')); echo "Testing pgsqlCopyToArray() with error\n"; try { @@ -52,13 +53,13 @@ try { echo "Testing pgsqlCopyToFile() with default parameters\n"; $filename="test_pgsqlCopyToFile.csv"; -var_dump($db->pgsqlCopyToFile('test',$filename)); +var_dump($db->pgsqlCopyToFile('test_copy_to',$filename)); echo file_get_contents($filename); echo "Testing pgsqlCopyToFile() with different field separator and not null indicator\n"; -var_dump($db->pgsqlCopyToFile('test',$filename,";","NULL")); +var_dump($db->pgsqlCopyToFile('test_copy_to',$filename,";","NULL")); echo file_get_contents($filename); echo "Testing pgsqlCopyToFile() with only selected fields\n"; -var_dump($db->pgsqlCopyToFile('test',$filename,";","NULL",'a,c')); +var_dump($db->pgsqlCopyToFile('test_copy_to',$filename,";","NULL",'a,c')); echo file_get_contents($filename); echo "Testing pgsqlCopyToFile() with error\n"; @@ -70,7 +71,7 @@ try { echo "Testing pgsqlCopyToFile() to unwritable file\n"; try { - var_dump($db->pgsqlCopyToFile('test', 'nonexistent/foo.csv')); + var_dump($db->pgsqlCopyToFile('test_copy_to', 'nonexistent/foo.csv')); } catch (Exception $e) { echo "Exception: {$e->getMessage()}\n"; } diff --git a/ext/pdo_pgsql/tests/is_in_transaction.phpt b/ext/pdo_pgsql/tests/is_in_transaction.phpt index f243223e4529..d5abd355d8bd 100644 --- a/ext/pdo_pgsql/tests/is_in_transaction.phpt +++ b/ext/pdo_pgsql/tests/is_in_transaction.phpt @@ -16,14 +16,15 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); -$db->exec('CREATE TABLE test (a integer not null primary key, b text)'); +$db->query('DROP TABLE IF EXISTS test_is_in_transaction CASCADE'); +$db->exec('CREATE TABLE test_is_in_transaction (a integer not null primary key, b text)'); $db->beginTransaction(); try { echo "Test PDO::PGSQL_TRANSACTION_INTRANS\n"; var_dump($db->inTransaction()); -$stmt = $db->prepare("INSERT INTO test (a, b) values (?, ?)"); +$stmt = $db->prepare("INSERT INTO test_is_in_transaction (a, b) values (?, ?)"); $stmt->bindValue(1, 1); $stmt->bindValue(2, "test insert"); $stmt->execute(); @@ -36,7 +37,7 @@ var_dump($db->inTransaction()); $db->beginTransaction(); try { -$stmt = $db->prepare("INSERT INTO test (a, b) values (?, ?)"); +$stmt = $db->prepare("INSERT INTO test_is_in_transaction (a, b) values (?, ?)"); $stmt->bindValue(1, "error"); $stmt->bindValue(2, "test insert"); $stmt->execute(); diff --git a/ext/pdo_pgsql/tests/large_objects.phpt b/ext/pdo_pgsql/tests/large_objects.phpt index b475285c5f5b..f9b35e976137 100644 --- a/ext/pdo_pgsql/tests/large_objects.phpt +++ b/ext/pdo_pgsql/tests/large_objects.phpt @@ -16,7 +16,8 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); -$db->exec('CREATE TABLE test (blobid integer not null primary key, bloboid OID)'); +$db->query('DROP TABLE IF EXISTS test_large_objects CASCADE'); +$db->exec('CREATE TABLE test_large_objects (blobid integer not null primary key, bloboid OID)'); $db->beginTransaction(); $oid = $db->pgsqlLOBCreate(); @@ -24,7 +25,7 @@ try { $stm = $db->pgsqlLOBOpen($oid, 'w+b'); fwrite($stm, "Hello dude\n"); -$stmt = $db->prepare("INSERT INTO test (blobid, bloboid) values (?, ?)"); +$stmt = $db->prepare("INSERT INTO test_large_objects (blobid, bloboid) values (?, ?)"); $stmt->bindValue(1, 1); /* bind as LOB; the oid from the pgsql stream will be inserted instead * of the stream contents. Binding other streams will attempt to bind @@ -35,7 +36,7 @@ $stmt->execute(); $stm = null; /* Pull it out */ -$stmt = $db->prepare("SELECT * from test"); +$stmt = $db->prepare("SELECT * from test_large_objects"); $stmt->bindColumn('bloboid', $lob, PDO::PARAM_LOB); $stmt->execute(); echo "Fetching:\n"; @@ -46,7 +47,7 @@ while (($row = $stmt->fetch(PDO::FETCH_ASSOC))) { echo "Fetched!\n"; /* Try again, with late bind */ -$stmt = $db->prepare("SELECT * from test"); +$stmt = $db->prepare("SELECT * from test_large_objects"); $stmt->execute(); $stmt->bindColumn('bloboid', $lob, PDO::PARAM_LOB); echo "Fetching late bind:\n"; @@ -57,7 +58,7 @@ while (($row = $stmt->fetch(PDO::FETCH_ASSOC))) { echo "Fetched!\n"; /* Try again, with NO bind */ -$stmt = $db->prepare("SELECT * from test"); +$stmt = $db->prepare("SELECT * from test_large_objects"); $stmt->execute(); $stmt->bindColumn('bloboid', $lob, PDO::PARAM_LOB); echo "Fetching NO bind:\n"; From 8ef0e4cfa014a61fbbb2b4a8066a15c132d7fcac Mon Sep 17 00:00:00 2001 From: Arne_ Date: Fri, 4 Aug 2023 17:47:04 +0200 Subject: [PATCH 081/120] Allow easter_date to process years after 2037 on 64bit systems (#11862) Added a check to easter_date to allow it to run with years past 2037 when on a 64bit platform. --- UPGRADING | 4 +++ ext/calendar/easter.c | 24 +++++++++++++- ...aster_date.phpt => easter_date_32bit.phpt} | 4 ++- ext/calendar/tests/easter_date_64bit.phpt | 33 +++++++++++++++++++ .../easter_date_checks_upper_bound_32bit.phpt | 21 ++++++++++++ .../easter_date_checks_upper_bound_64bit.phpt | 21 ++++++++++++ 6 files changed, 105 insertions(+), 2 deletions(-) rename ext/calendar/tests/{easter_date.phpt => easter_date_32bit.phpt} (81%) create mode 100644 ext/calendar/tests/easter_date_64bit.phpt create mode 100644 ext/calendar/tests/easter_date_checks_upper_bound_32bit.phpt create mode 100644 ext/calendar/tests/easter_date_checks_upper_bound_64bit.phpt diff --git a/UPGRADING b/UPGRADING index e30f94ad8f6f..d9d1d6ee8023 100644 --- a/UPGRADING +++ b/UPGRADING @@ -317,6 +317,10 @@ PHP 8.3 UPGRADE NOTES significant digits before the decimal point. Previously negative $decimals got silently ignored and the number got rounded to zero decimal places. +- Calendar + . easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit systems, + previously it only supported years in the range from 1970 to 2037. + ======================================== 6. New Functions ======================================== diff --git a/ext/calendar/easter.c b/ext/calendar/easter.c index c319abd17fef..579e8af72eac 100644 --- a/ext/calendar/easter.c +++ b/ext/calendar/easter.c @@ -13,6 +13,7 @@ | Authors: Shane Caraveo | | Colin Viebrock | | Hartmut Holzgraefe | + | Arne Perschke | +----------------------------------------------------------------------+ */ @@ -21,6 +22,10 @@ #include "sdncal.h" #include +/** + * If `gm` is true this will return the timestamp at midnight on Easter of the given year. If it is false this + * will return the number of days Easter is after March 21st. + */ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, bool gm) { /* based on code by Simon Kershaw, */ @@ -48,10 +53,27 @@ static void _cal_easter(INTERNAL_FUNCTION_PARAMETERS, bool gm) } } - if (gm && (year<1970 || year>2037)) { /* out of range for timestamps */ + #ifdef ZEND_ENABLE_ZVAL_LONG64 + /* Compiling for 64bit, allow years between 1970 and 2.000.000.000 */ + if (gm && year < 1970) { + /* timestamps only start after 1970 */ + zend_argument_value_error(1, "must be a year after 1970 (inclusive)"); + RETURN_THROWS(); + } + + if (gm && year > 2000000000) { + /* timestamps only go up to the year 2.000.000.000 */ + zend_argument_value_error(1, "must be a year before 2.000.000.000 (inclusive)"); + RETURN_THROWS(); + } + #else + /* Compiling for 32bit, allow years between 1970 and 2037 */ + if (gm && (year < 1970 || year > 2037)) { zend_argument_value_error(1, "must be between 1970 and 2037 (inclusive)"); RETURN_THROWS(); } + #endif + golden = (year % 19) + 1; /* the Golden number */ diff --git a/ext/calendar/tests/easter_date.phpt b/ext/calendar/tests/easter_date_32bit.phpt similarity index 81% rename from ext/calendar/tests/easter_date.phpt rename to ext/calendar/tests/easter_date_32bit.phpt index a41c310de9b8..52f880edc113 100644 --- a/ext/calendar/tests/easter_date.phpt +++ b/ext/calendar/tests/easter_date_32bit.phpt @@ -1,5 +1,7 @@ --TEST-- -easter_date() +Test easter_date() on 32bit systems +--SKIPIF-- + --INI-- date.timezone=UTC --ENV-- diff --git a/ext/calendar/tests/easter_date_64bit.phpt b/ext/calendar/tests/easter_date_64bit.phpt new file mode 100644 index 000000000000..3939b7e4a4d4 --- /dev/null +++ b/ext/calendar/tests/easter_date_64bit.phpt @@ -0,0 +1,33 @@ +--TEST-- +Test easter_date() on 64bit systems +--SKIPIF-- + +--INI-- +date.timezone=UTC +--ENV-- +TZ=UTC +--EXTENSIONS-- +calendar +--FILE-- +getMessage()}\n"; +} +?> +--EXPECT-- +2000-04-23 +2001-04-15 +2002-03-31 +2045-04-09 +2046-03-25 +2047-04-14 +easter_date(): Argument #1 ($year) must be a year after 1970 (inclusive) diff --git a/ext/calendar/tests/easter_date_checks_upper_bound_32bit.phpt b/ext/calendar/tests/easter_date_checks_upper_bound_32bit.phpt new file mode 100644 index 000000000000..6a9cee8027fb --- /dev/null +++ b/ext/calendar/tests/easter_date_checks_upper_bound_32bit.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test easter_date() on 32bit systems checks the upper year limit +--SKIPIF-- + +--INI-- +date.timezone=UTC +--ENV-- +TZ=UTC +--EXTENSIONS-- +calendar +--FILE-- +getMessage()}\n"; +} +?> +--EXPECT-- +easter_date(): Argument #1 ($year) must be between 1970 and 2037 (inclusive) diff --git a/ext/calendar/tests/easter_date_checks_upper_bound_64bit.phpt b/ext/calendar/tests/easter_date_checks_upper_bound_64bit.phpt new file mode 100644 index 000000000000..2c7afbdfa2d9 --- /dev/null +++ b/ext/calendar/tests/easter_date_checks_upper_bound_64bit.phpt @@ -0,0 +1,21 @@ +--TEST-- +Test easter_date() on 64bit systems checks the upper year limit +--SKIPIF-- + +--INI-- +date.timezone=UTC +--ENV-- +TZ=UTC +--EXTENSIONS-- +calendar +--FILE-- +getMessage()}\n"; +} +?> +--EXPECT-- +easter_date(): Argument #1 ($year) must be a year before 2.000.000.000 (inclusive) From aecedd25dd855859027badffb268cb3113e8e46e Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 4 Aug 2023 18:24:53 +0100 Subject: [PATCH 082/120] [skip ci] Reorder extension sections in UPGRADING --- UPGRADING | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/UPGRADING b/UPGRADING index d9d1d6ee8023..e8377b9d1642 100644 --- a/UPGRADING +++ b/UPGRADING @@ -214,6 +214,15 @@ PHP 8.3 UPGRADE NOTES circumvented by prepending `./` to the path. . User exception handlers now catch exceptions during shutdown. +- Calendar + . easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit systems, + previously it only supported years in the range from 1970 to 2037. + +- Curl: + . curl_getinfo() now supports two new constants: CURLINFO_CAPATH and + CURLINFO_CAINFO. If option is null, the following two additional keys are + present: "capath" and "cainfo". + - Dom: . Changed DOMCharacterData::appendData() tentative return type to true. . DOMDocument::loadHTML(), DOMDocument::loadHTMLFile(), DOMDocument::loadXML(), @@ -235,11 +244,6 @@ PHP 8.3 UPGRADE NOTES . IntlChar::enumCharNames is now returning a boolean. Previously it returned null on success and false on failure. -- Curl: - . curl_getinfo() now supports two new constants: CURLINFO_CAPATH and - CURLINFO_CAINFO. If option is null, the following two additional keys are - present: "capath" and "cainfo". - - MBString: . mb_strtolower, mb_strtotitle, and mb_convert_case implement conditional casing rules for the Greek letter sigma. For mb_convert_case, conditional @@ -317,10 +321,6 @@ PHP 8.3 UPGRADE NOTES significant digits before the decimal point. Previously negative $decimals got silently ignored and the number got rounded to zero decimal places. -- Calendar - . easter_date() now supports years from 1970 to 2,000,000,000 on 64-bit systems, - previously it only supported years in the range from 1970 to 2037. - ======================================== 6. New Functions ======================================== From dc586b121a002a532af2f1733070a34f48cac9e0 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:12:38 +0200 Subject: [PATCH 083/120] Mark buildFromIterator test as conflicting Commit 0b2e6bc2b0 started caching the directory entry type to improve performance. Shortly after, we've seen flaky failures of the buildFromIterator phar test. When it fails, it's always a value error in the constructor of RecursiveDirectoryIterator::__construct() with a "no such file or directory" error. What's happening here is this: 1) A parallel test creates a subdirectory in the current working dir. 2) This test checks hasChildren() on a directory entry, the cached entry returns "yes" on the subdirectory. 3) The parallel test finishes and removes the subdirectory. 4) The constructor mentioned above is called, causing an exception because the directory is gone. This race has always been possible, even before said commit. It's just that it was very hard to hit before: the expensive stat call made the race window hard to hit. The race is now easier to hit because of the caching that is fast. Since there's many tests that modify the current working directory, it seems best to mark this as an "all" conflict. We cannot avoid every TOC-TOU race when working with files with these phar tests. In particular, mounteddir.phpt caused every conflict I saw on CI, but there's more tests that create subdirectories in the current working directory. Closes GH-11869. --- ext/phar/tests/phar_buildfromiterator10.phpt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/phar/tests/phar_buildfromiterator10.phpt b/ext/phar/tests/phar_buildfromiterator10.phpt index 3a57e7808ae7..495f177fabb2 100644 --- a/ext/phar/tests/phar_buildfromiterator10.phpt +++ b/ext/phar/tests/phar_buildfromiterator10.phpt @@ -2,6 +2,8 @@ Phar::buildFromIterator() RegexIterator(RecursiveIteratorIterator), SplFileInfo as current --EXTENSIONS-- phar +--CONFLICTS-- +all --INI-- phar.require_hash=0 phar.readonly=0 From ca5d48213a93034e3f27ce1ab7e48365b766938f Mon Sep 17 00:00:00 2001 From: Yurun Date: Wed, 28 Jun 2023 16:29:31 +0800 Subject: [PATCH 084/120] Fix MySQL Statement has a empty query result when the response field has changed, also Segmentation fault Closes GH-11551. --- NEWS | 3 ++ ext/mysqli/tests/gh11550.phpt | 70 +++++++++++++++++++++++++++ ext/mysqlnd/mysqlnd_result.c | 6 ++- ext/pdo_mysql/tests/gh11550.phpt | 82 ++++++++++++++++++++++++++++++++ 4 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 ext/mysqli/tests/gh11550.phpt create mode 100644 ext/pdo_mysql/tests/gh11550.phpt diff --git a/NEWS b/NEWS index 82b6f9858b48..c245c0bdc85c 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,9 @@ PHP NEWS . Fixed bug GH-11438 (mysqlnd fails to authenticate with sha256_password accounts using passwords longer than 19 characters). (nielsdos, Kamil Tekiela) + . Fixed bug GH-11550 (MySQL Statement has a empty query result when + the response field has changed, also Segmentation fault). + (Yurunsoft) - Opcache: . Fixed bug GH-11715 (opcache.interned_strings_buffer either has no effect or diff --git a/ext/mysqli/tests/gh11550.phpt b/ext/mysqli/tests/gh11550.phpt new file mode 100644 index 000000000000..6ed02ec91d51 --- /dev/null +++ b/ext/mysqli/tests/gh11550.phpt @@ -0,0 +1,70 @@ +--TEST-- +Bug GH-11550 (MySQL Statement has a empty query result when the response field has changed, also Segmentation fault) +--EXTENSIONS-- +mysqli +--SKIPIF-- + +--FILE-- +query(<<<'SQL' +CREATE TABLE `test_gh11550` ( + `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + INDEX `name`(`name`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; +SQL); +$link->query(<<<'SQL' +INSERT INTO `test_gh11550` (`name`) VALUES ('test1'); +SQL); + +$stmt = $link->prepare('select * from test_gh11550'); +var_dump('mysqli-1:', $stmt->execute(), $stmt->get_result()->fetch_all()); + +$link->query(<<<'SQL' +ALTER TABLE `test_gh11550` +ADD COLUMN `a` varchar(255) NOT NULL DEFAULT ''; +SQL); + +var_dump('mysqli-2:', $stmt->execute(), $stmt->get_result()->fetch_all()); +echo 'Done'; +?> +--CLEAN-- +query('DROP TABLE IF EXISTS test_gh11550'); +?> +--EXPECT-- +string(9) "mysqli-1:" +bool(true) +array(1) { + [0]=> + array(2) { + [0]=> + int(1) + [1]=> + string(5) "test1" + } +} +string(9) "mysqli-2:" +bool(true) +array(1) { + [0]=> + array(3) { + [0]=> + int(1) + [1]=> + string(5) "test1" + [2]=> + string(0) "" + } +} +Done diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index f2b98a2bc235..b1a400499781 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -286,8 +286,12 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s) COM_STMT_EXECUTE (even if it is not necessary), so either this or previous branch always works. */ + if (rset_header.field_count != stmt->result->field_count) { + stmt->result->m.free_result(stmt->result, TRUE); + stmt->result = conn->m->result_init(rset_header.field_count); + } + result = stmt->result; } - result = stmt->result; } if (!result) { SET_OOM_ERROR(conn->error_info); diff --git a/ext/pdo_mysql/tests/gh11550.phpt b/ext/pdo_mysql/tests/gh11550.phpt new file mode 100644 index 000000000000..5bf0b26497ca --- /dev/null +++ b/ext/pdo_mysql/tests/gh11550.phpt @@ -0,0 +1,82 @@ +--TEST-- +Bug GH-11550 (MySQL Statement has a empty query result when the response field has changed, also Segmentation fault) +--EXTENSIONS-- +pdo +pdo_mysql +--SKIPIF-- + +--FILE-- +exec(<<<'SQL' +CREATE TABLE `test_gh11550` ( + `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, + PRIMARY KEY (`id`) USING BTREE, + INDEX `name`(`name`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; +SQL); +$pdo->exec(<<<'SQL' +INSERT INTO `test_gh11550` (`name`) VALUES ('test1'); +SQL); + +$stmt = $pdo->prepare('select * from test_gh11550'); +var_dump('PDO-1:', $stmt->execute(), $stmt->fetchAll()); + +$stmt->closeCursor(); // Optional. Segmentation fault (core dumped) + +$pdo->exec(<<<'SQL' +ALTER TABLE `test_gh11550` +ADD COLUMN `a` varchar(255) NOT NULL DEFAULT ''; +SQL); + +var_dump('PDO-2:', $stmt->execute(), $stmt->fetchAll()); +echo 'Done'; +?> +--CLEAN-- +query('DROP TABLE IF EXISTS test_gh11550'); +?> +--EXPECT-- +string(6) "PDO-1:" +bool(true) +array(1) { + [0]=> + array(4) { + ["id"]=> + int(1) + [0]=> + int(1) + ["name"]=> + string(5) "test1" + [1]=> + string(5) "test1" + } +} +string(6) "PDO-2:" +bool(true) +array(1) { + [0]=> + array(6) { + ["id"]=> + int(1) + [0]=> + int(1) + ["name"]=> + string(5) "test1" + [1]=> + string(5) "test1" + ["a"]=> + string(0) "" + [2]=> + string(0) "" + } +} +Done From 0311e60eb431c1e258a1507dfdd821d83b702725 Mon Sep 17 00:00:00 2001 From: Levi Morrison Date: Fri, 4 Aug 2023 15:39:50 -0600 Subject: [PATCH 085/120] Add php_version and php_version_id PHPAPI funcs (#11875) Mostly, extensions will use `PHP_VERSION` and `PHP_VERSION_ID` respectfully but sometimes they want to grab the version at run-time rather than at compile-time. For example, extensions which distribute pre-built binaries may want this. --- main/main.c | 10 ++++++++++ main/php_main.h | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/main/main.c b/main/main.c index d918e0b73ae7..5ca23a92dab5 100644 --- a/main/main.c +++ b/main/main.c @@ -96,6 +96,16 @@ PHPAPI size_t core_globals_offset; #define SAFE_FILENAME(f) ((f)?(f):"-") +PHPAPI const char *php_version(void) +{ + return PHP_VERSION; +} + +PHPAPI unsigned int php_version_id(void) +{ + return PHP_VERSION_ID; +} + /* {{{ PHP_INI_MH */ static PHP_INI_MH(OnSetFacility) { diff --git a/main/php_main.h b/main/php_main.h index 40c1b773fd2f..213043b19b18 100644 --- a/main/php_main.h +++ b/main/php_main.h @@ -23,6 +23,19 @@ #include "SAPI.h" BEGIN_EXTERN_C() + +/* Returns the PHP version the engine was built with. This is useful for + * extensions which want to know the version of PHP at run-time, rather than + * the version they were built with at compile-time. + */ +PHPAPI const char *php_version(void); + +/* Returns the PHP version id the engine was built with. This is useful for + * extensions which want to know the version of PHP at run-time, rather than + * the version they were built with at compile-time. + */ +PHPAPI unsigned int php_version_id(void); + PHPAPI zend_result php_request_startup(void); PHPAPI void php_request_shutdown(void *dummy); PHPAPI zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_module); From 4f84b159b908921cc627ef81de0c6ae883e88a78 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com> Date: Sat, 5 Aug 2023 03:11:57 +0200 Subject: [PATCH 086/120] ext/pdo_pgsql: Improve tests cleanup (#11855) --- ext/pdo_pgsql/tests/bug46274.phpt | 10 ++++++---- ext/pdo_pgsql/tests/bug46274_2.phpt | 10 ++++++---- ext/pdo_pgsql/tests/bug66584.phpt | 6 ++++++ ext/pdo_pgsql/tests/bug67462.phpt | 6 ++++++ ext/pdo_pgsql/tests/bug70861.phpt | 9 ++++++++- ext/pdo_pgsql/tests/bug72633.phpt | 9 ++++++--- ext/pdo_pgsql/tests/bug75402.phpt | 7 ++++++- ext/pdo_pgsql/tests/bug_33876.phpt | 7 ++++++- ext/pdo_pgsql/tests/bug_49985.phpt | 7 ++++++- ext/pdo_pgsql/tests/copy_from.phpt | 7 ++++++- ext/pdo_pgsql/tests/copy_to.phpt | 7 ++++++- ext/pdo_pgsql/tests/is_in_transaction.phpt | 8 ++++++-- ext/pdo_pgsql/tests/large_objects.phpt | 8 ++++++-- 13 files changed, 80 insertions(+), 21 deletions(-) diff --git a/ext/pdo_pgsql/tests/bug46274.phpt b/ext/pdo_pgsql/tests/bug46274.phpt index eef234c12076..610db81a0451 100644 --- a/ext/pdo_pgsql/tests/bug46274.phpt +++ b/ext/pdo_pgsql/tests/bug46274.phpt @@ -21,7 +21,6 @@ try { } catch (Exception $e) { } -$db->query('DROP TABLE IF EXISTS test_one_blob_46274_1 CASCADE'); $db->query('CREATE TABLE test_one_blob_46274_1 (id SERIAL NOT NULL, blob1 BYTEA)'); $stmt = $db->prepare("INSERT INTO test_one_blob_46274_1 (blob1) VALUES (:foo)"); @@ -62,9 +61,12 @@ var_dump($res->fetch()); // NULL var_dump($res->fetch()); - -$db->query('DROP TABLE test_one_blob_46274_1'); - +?> +--CLEAN-- +query('DROP TABLE IF EXISTS test_one_blob_46274_1'); ?> --EXPECT-- array(2) { diff --git a/ext/pdo_pgsql/tests/bug46274_2.phpt b/ext/pdo_pgsql/tests/bug46274_2.phpt index 7a17e66b54d8..21dce8cbf409 100644 --- a/ext/pdo_pgsql/tests/bug46274_2.phpt +++ b/ext/pdo_pgsql/tests/bug46274_2.phpt @@ -21,7 +21,6 @@ try { } catch (Exception $e) { } -$db->query('DROP TABLE IF EXISTS test_one_blob_46274_2 CASCADE'); $db->query('CREATE TABLE test_one_blob_46274_2 (id SERIAL NOT NULL, blob1 BYTEA)'); $stmt = $db->prepare("INSERT INTO test_one_blob_46274_2 (blob1) VALUES (:foo)"); @@ -65,9 +64,12 @@ var_dump(fread($x['blob1'], 10)); // NULL var_dump($res->fetch()); - -$db->query('DROP TABLE test_one_blob_46274_2'); - +?> +--CLEAN-- +query('DROP TABLE IF EXISTS test_one_blob_46274_2'); ?> --EXPECTF-- array(2) { diff --git a/ext/pdo_pgsql/tests/bug66584.phpt b/ext/pdo_pgsql/tests/bug66584.phpt index 010a1d229e96..1df28e037afa 100644 --- a/ext/pdo_pgsql/tests/bug66584.phpt +++ b/ext/pdo_pgsql/tests/bug66584.phpt @@ -56,6 +56,12 @@ function run($pdo, $data) var_dump($stmt->fetchColumn()); } +?> +--CLEAN-- +query("DROP TABLE IF EXISTS b66584"); ?> --EXPECTF-- int(3) diff --git a/ext/pdo_pgsql/tests/bug67462.phpt b/ext/pdo_pgsql/tests/bug67462.phpt index e9d7a40be01f..b3e85fee96df 100644 --- a/ext/pdo_pgsql/tests/bug67462.phpt +++ b/ext/pdo_pgsql/tests/bug67462.phpt @@ -29,6 +29,12 @@ try { var_dump($pdo->beginTransaction()); } +?> +--CLEAN-- +query("DROP TABLE IF EXISTS b67462"); ?> --EXPECT-- bool(true) diff --git a/ext/pdo_pgsql/tests/bug70861.phpt b/ext/pdo_pgsql/tests/bug70861.phpt index 5ac4f043a99d..e64c97f12c1e 100644 --- a/ext/pdo_pgsql/tests/bug70861.phpt +++ b/ext/pdo_pgsql/tests/bug70861.phpt @@ -21,7 +21,6 @@ try { } catch (Exception $e) { } -$db->query('DROP TABLE IF EXISTS test_blob_crash_70861 CASCADE'); $db->query('CREATE TABLE test_blob_crash_70861 (id SERIAL NOT NULL, blob1 BYTEA)'); class HelloWrapper { @@ -41,8 +40,16 @@ $stmt->execute(); fclose($f); +$db->exec('DROP TABLE test_blob_crash'); + ?> +++DONE+++ +--CLEAN-- +query('DROP TABLE IF EXISTS test_blob_crash_70861 CASCADE'); +?> --EXPECTF-- %a +++DONE+++ diff --git a/ext/pdo_pgsql/tests/bug72633.phpt b/ext/pdo_pgsql/tests/bug72633.phpt index 2d8c5683f127..6f60577075e2 100644 --- a/ext/pdo_pgsql/tests/bug72633.phpt +++ b/ext/pdo_pgsql/tests/bug72633.phpt @@ -18,7 +18,6 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); -$db->query('DROP TABLE IF EXISTS test_last_id_72633 CASCADE'); $db->query('CREATE TABLE test_last_id_72633 (id SERIAL NOT NULL, field1 VARCHAR(10))'); $stmt = $db->prepare("INSERT INTO test_last_id_72633 (field1) VALUES ('test')"); @@ -34,8 +33,12 @@ var_dump($db->lastInsertId()); */ var_dump($db->lastInsertId('test_last_id_72633_id_seq')); -$db->query('DROP TABLE test_last_id_72633'); - +?> +--CLEAN-- +query('DROP TABLE IF EXISTS test_last_id_72633'); ?> --EXPECTREGEX-- string\([0-9]*\)\ \"[0-9]*\" diff --git a/ext/pdo_pgsql/tests/bug75402.phpt b/ext/pdo_pgsql/tests/bug75402.phpt index f09625a833c4..db0820e36513 100644 --- a/ext/pdo_pgsql/tests/bug75402.phpt +++ b/ext/pdo_pgsql/tests/bug75402.phpt @@ -17,7 +17,6 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $resp = new \stdClass(); $resp->entries = []; -$db->query('DROP TABLE IF EXISTS bug75402 CASCADE'); $db->query('CREATE TABLE bug75402 ( "id" character varying(64) NOT NULL, "group_id" character varying(64) NOT NULL, @@ -84,6 +83,12 @@ if ($db) { var_dump($resp); ?> +--CLEAN-- +exec('DROP TABLE IF EXISTS bug75402'); +?> --EXPECT-- object(stdClass)#2 (1) { ["entries"]=> diff --git a/ext/pdo_pgsql/tests/bug_33876.phpt b/ext/pdo_pgsql/tests/bug_33876.phpt index 1a1842ee2340..6b062f6ceb16 100644 --- a/ext/pdo_pgsql/tests/bug_33876.phpt +++ b/ext/pdo_pgsql/tests/bug_33876.phpt @@ -16,7 +16,6 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); $db->exec("SET LC_MESSAGES='C'"); -$db->query('DROP TABLE IF EXISTS b33876 CASCADE'); $db->exec('CREATE TABLE b33876 (foo varchar(5) NOT NULL, bar bool NOT NULL)'); $db->exec("INSERT INTO b33876 VALUES('false','f')"); $db->exec("INSERT INTO b33876 VALUES('true', 't')"); @@ -95,6 +94,12 @@ function normalizeErrorInfo(array $err): array { return $err; } +?> +--CLEAN-- +query('DROP TABLE IF EXISTS b33876 CASCADE'); ?> --EXPECTF-- Array diff --git a/ext/pdo_pgsql/tests/bug_49985.phpt b/ext/pdo_pgsql/tests/bug_49985.phpt index 870e69e02ffe..b1ba388655e0 100644 --- a/ext/pdo_pgsql/tests/bug_49985.phpt +++ b/ext/pdo_pgsql/tests/bug_49985.phpt @@ -15,7 +15,6 @@ require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); -$db->query('DROP TABLE IF EXISTS b49985 CASCADE'); $db->exec("CREATE TABLE b49985 (a int PRIMARY KEY)"); for ($i = 0; $i < 3; $i++) { @@ -30,6 +29,12 @@ for ($i = 0; $i < 3; $i++) { } } +?> +--CLEAN-- +query('DROP TABLE IF EXISTS b49985 CASCADE'); ?> --EXPECTF-- bool(true) diff --git a/ext/pdo_pgsql/tests/copy_from.phpt b/ext/pdo_pgsql/tests/copy_from.phpt index 65669dfd78ed..5bb46531329a 100644 --- a/ext/pdo_pgsql/tests/copy_from.phpt +++ b/ext/pdo_pgsql/tests/copy_from.phpt @@ -16,7 +16,6 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); -$db->query('DROP TABLE IF EXISTS test_copy_from CASCADE'); $db->exec('CREATE TABLE test_copy_from (a integer not null primary key, b text, c integer)'); echo "Preparing test file and array for CopyFrom tests\n"; @@ -127,6 +126,12 @@ foreach (array($filename, $filenameWithDifferentNullValues, $filenameWithDiffere @unlink($f); } ?> +--CLEAN-- +query('DROP TABLE IF EXISTS test_copy_from CASCADE'); +?> --EXPECTF-- Preparing test file and array for CopyFrom tests Testing pgsqlCopyFromArray() with default parameters diff --git a/ext/pdo_pgsql/tests/copy_to.phpt b/ext/pdo_pgsql/tests/copy_to.phpt index f0e0bdf0f5bb..add5cdd3a08e 100644 --- a/ext/pdo_pgsql/tests/copy_to.phpt +++ b/ext/pdo_pgsql/tests/copy_to.phpt @@ -16,7 +16,6 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); -$db->query('DROP TABLE IF EXISTS test_copy_to CASCADE'); $db->exec('CREATE TABLE test_copy_to (a integer not null primary key, b text, c integer)'); $db->beginTransaction(); @@ -80,6 +79,12 @@ if(isset($filename)) { @unlink($filename); } ?> +--CLEAN-- +exec('DROP TABLE test_copy_to'); +?> --EXPECTF-- Preparing test table for CopyTo tests Testing pgsqlCopyToArray() with default parameters diff --git a/ext/pdo_pgsql/tests/is_in_transaction.phpt b/ext/pdo_pgsql/tests/is_in_transaction.phpt index d5abd355d8bd..8ff61ff1c8ea 100644 --- a/ext/pdo_pgsql/tests/is_in_transaction.phpt +++ b/ext/pdo_pgsql/tests/is_in_transaction.phpt @@ -16,7 +16,6 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); -$db->query('DROP TABLE IF EXISTS test_is_in_transaction CASCADE'); $db->exec('CREATE TABLE test_is_in_transaction (a integer not null primary key, b text)'); $db->beginTransaction(); @@ -56,7 +55,12 @@ var_dump($db->inTransaction()); echo "Exception! at line ", $e->getLine(), "\n"; var_dump($e->getMessage()); } - +?> +--CLEAN-- +exec('DROP TABLE test_is_in_transaction'); ?> --EXPECT-- Test PDO::PGSQL_TRANSACTION_INTRANS diff --git a/ext/pdo_pgsql/tests/large_objects.phpt b/ext/pdo_pgsql/tests/large_objects.phpt index f9b35e976137..401f53da8c07 100644 --- a/ext/pdo_pgsql/tests/large_objects.phpt +++ b/ext/pdo_pgsql/tests/large_objects.phpt @@ -16,7 +16,6 @@ $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); -$db->query('DROP TABLE IF EXISTS test_large_objects CASCADE'); $db->exec('CREATE TABLE test_large_objects (blobid integer not null primary key, bloboid OID)'); $db->beginTransaction(); @@ -78,7 +77,12 @@ echo "Fetched!\n"; /* Now to remove the large object from the database, so it doesn't * linger and clutter up the storage */ $db->pgsqlLOBUnlink($oid); - +?> +--CLEAN-- +exec('DROP TABLE test_large_objects'); ?> --EXPECT-- Fetching: From 3ff7d18070b4544491327689529d20a277a49eb1 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 5 Aug 2023 22:12:04 +0200 Subject: [PATCH 087/120] [ci skip] NEWS for fa397e02 and 6f6fedcb --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 39edae4f2ca4..7ff420014b60 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.0beta3 +- DOM: + . adoptNode now respects the strict error checking property. (nielsdos) + - Opcache: . Avoid resetting JIT counter handlers from multiple processes/threads. (ilutov) From 872bf56fed83cd3e0c0581a187502b81cfdb7e73 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 6 Aug 2023 17:15:42 +0200 Subject: [PATCH 088/120] Remove useless check This is a remnant from the time the parser could be invoked statically. --- ext/dom/document.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ext/dom/document.c b/ext/dom/document.c index 03f8b2cbd79d..3ade2f7b9409 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1204,17 +1204,13 @@ static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, size_t so { xmlDocPtr ret; xmlParserCtxtPtr ctxt = NULL; - dom_object *intern; - php_libxml_ref_obj *document = NULL; int validate, recover, resolve_externals, keep_blanks, substitute_ent; int resolved_path_len; int old_error_reporting = 0; char *directory=NULL, resolved_path[MAXPATHLEN + 1]; - if (id != NULL) { - intern = Z_DOMOBJ_P(id); - document = intern->document; - } + dom_object *intern = Z_DOMOBJ_P(id); + php_libxml_ref_obj *document = intern->document; libxml_doc_props const* doc_props = dom_get_doc_props_read_only(document); validate = doc_props->validateonparse; From 5cd0208e9f2fbf723903928b898aa54d6d008ff6 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 3 Aug 2023 15:04:37 +0200 Subject: [PATCH 089/120] Don't test macOS & i386 without opcache on push It should be incredibly rare for something to fail only without opcache while also being platform specific. We're keeping opcache-less tests for x64 Linux, macOS and i386 will continue to be tested without opcache in nightly. Closes GH-11867 --- .github/workflows/push.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f61340486f18..1984814eebdb 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -114,8 +114,6 @@ jobs: run: make -j$(/usr/bin/nproc) >/dev/null - name: make install uses: ./.github/actions/install-linux-x32 - - name: Test - uses: ./.github/actions/test-linux - name: Test Tracing JIT uses: ./.github/actions/test-linux with: @@ -145,8 +143,6 @@ jobs: make -j$(sysctl -n hw.logicalcpu) >/dev/null - name: make install run: sudo make install - - name: Test - uses: ./.github/actions/test-macos - name: Test Tracing JIT uses: ./.github/actions/test-macos with: From efc73f24c30400f2c62420c19d0891bc4d891d90 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 7 Aug 2023 12:58:12 +0200 Subject: [PATCH 090/120] Revert "Call cast_object handler from get_properties_for" This reverts commit 4182813ebffe0570e3741debd7da543df3517d0d. --- UPGRADING.INTERNALS | 2 -- Zend/zend_object_handlers.c | 10 ---------- ext/com_dotnet/com_handlers.c | 4 ---- ext/simplexml/simplexml.c | 1 - 4 files changed, 17 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 4a3254b2353c..1a8c5970c7f0 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -70,8 +70,6 @@ PHP 8.3 INTERNALS UPGRADE NOTES * _php_stream_dirent now has an extra d_type field that is used to store the directory entry type. This can be used to avoid additional stat calls for types when the type is already known. -* zend_std_get_properties_for now calls the cast_object handler when casting - objects to arrays. ======================== 2. Build system changes diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 1ff5ed63782a..b18d0f46f80a 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -1975,16 +1975,6 @@ ZEND_API HashTable *zend_std_get_properties_for(zend_object *obj, zend_prop_purp } ZEND_FALLTHROUGH; case ZEND_PROP_PURPOSE_ARRAY_CAST: - if (obj->handlers->cast_object != std_object_handlers.cast_object) { - zval result; - if (obj->handlers->cast_object(obj, &result, IS_ARRAY) == SUCCESS) { - return Z_ARRVAL(result); - } - if (EG(exception)) { - return NULL; - } - } - ZEND_FALLTHROUGH; case ZEND_PROP_PURPOSE_SERIALIZE: case ZEND_PROP_PURPOSE_VAR_EXPORT: case ZEND_PROP_PURPOSE_JSON: diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index 93b1c414b7c7..0c73d8c4a3a7 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -431,10 +431,6 @@ static int com_objects_compare(zval *object1, zval *object2) static zend_result com_object_cast(zend_object *readobj, zval *writeobj, int type) { - if (type == IS_ARRAY) { - return FAILURE; - } - php_com_dotnet_object *obj; VARIANT v; VARTYPE vt = VT_EMPTY; diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index e03a61cd66ea..052be0c5cc7f 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1819,7 +1819,6 @@ static zend_result cast_object(zval *object, int type, char *contents) convert_scalar_to_number(object); break; default: - zval_ptr_dtor_nogc(object); return FAILURE; } return SUCCESS; From e701b2fee73cab16b6ccc6855eab8195c9a9b27b Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 5 Aug 2023 22:08:16 +0200 Subject: [PATCH 091/120] Make DOMChildNode::remove() run in O(1) performance This method had some useless logic in it. It checked whether the child node is a child of its parent, which is always true of course. But I know where this check comes from, if you follow the spec closely you'll find that the spec used to have explicit child and parent arguments for the removal algorithm [1]. That's because that algorithm is written in a generic way, where the parent and child arguments might not come from the same subtree. However, in this particular case it *is* always the case that the child is a child of its parent. The checks weren't needed back then for DOMChildNode::remove(), and are still not needed today. [1] e.g. https://web.archive.org/web/20180601092634/https://dom.spec.whatwg.org/#concept-node-remove --- UPGRADING | 1 + ext/dom/parentnode.c | 13 +------------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/UPGRADING b/UPGRADING index e8377b9d1642..f18c7118e921 100644 --- a/UPGRADING +++ b/UPGRADING @@ -611,6 +611,7 @@ PHP 8.3 UPGRADE NOTES longer takes quadratic time by default. . Getting text content from nodes now avoids an allocation, resulting in a performance gain. + . DOMChildNode::remove() now runs in O(1) performance. - Standard: . The file() flags error check is now about 7% faster. diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index ffccc78652cd..e3388a83121d 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -527,7 +527,6 @@ static zend_result dom_child_removal_preconditions(const xmlNodePtr child, int s void dom_child_node_remove(dom_object *context) { xmlNode *child = dom_object_get_node(context); - xmlNodePtr children; int stricterror; stricterror = dom_get_strict_error(context->document); @@ -536,19 +535,9 @@ void dom_child_node_remove(dom_object *context) return; } - children = child->parent->children; - php_libxml_invalidate_node_list_cache_from_doc(context->document->ptr); - while (children) { - if (children == child) { - xmlUnlinkNode(child); - return; - } - children = children->next; - } - - php_dom_throw_error(NOT_FOUND_ERR, stricterror); + xmlUnlinkNode(child); } void dom_child_replace_with(dom_object *context, zval *nodes, uint32_t nodesc) From 08c4db7f36d30578c803d8950df3deda4f46516d Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 6 Aug 2023 16:49:02 +0200 Subject: [PATCH 092/120] Fix manually calling __construct() on DOM classes Closes GH-11894. --- NEWS | 1 + ext/dom/attr.c | 2 +- ext/dom/cdatasection.c | 2 +- ext/dom/comment.c | 10 +++--- ext/dom/document.c | 26 +++++++------- ext/dom/documentfragment.c | 3 +- ext/dom/element.c | 2 +- ext/dom/entityreference.c | 10 +++--- ext/dom/processinginstruction.c | 2 +- ...MDocumentFragment_construct_basic_002.phpt | 16 --------- .../manually_call_constructor/attribute.phpt | 34 +++++++++++++++++++ .../cdatasection.phpt | 32 +++++++++++++++++ .../manually_call_constructor/comment.phpt | 34 +++++++++++++++++++ .../manually_call_constructor/document.phpt | 15 ++++++++ .../documentfragment.phpt | 32 +++++++++++++++++ .../manually_call_constructor/element.phpt | 34 +++++++++++++++++++ .../entityreference.phpt | 34 +++++++++++++++++++ .../processinginstruction.phpt | 34 +++++++++++++++++++ .../tests/manually_call_constructor/text.phpt | 33 ++++++++++++++++++ ext/dom/text.c | 10 +++--- 20 files changed, 312 insertions(+), 54 deletions(-) delete mode 100644 ext/dom/tests/DOMDocumentFragment_construct_basic_002.phpt create mode 100644 ext/dom/tests/manually_call_constructor/attribute.phpt create mode 100644 ext/dom/tests/manually_call_constructor/cdatasection.phpt create mode 100644 ext/dom/tests/manually_call_constructor/comment.phpt create mode 100644 ext/dom/tests/manually_call_constructor/document.phpt create mode 100644 ext/dom/tests/manually_call_constructor/documentfragment.phpt create mode 100644 ext/dom/tests/manually_call_constructor/element.phpt create mode 100644 ext/dom/tests/manually_call_constructor/entityreference.phpt create mode 100644 ext/dom/tests/manually_call_constructor/processinginstruction.phpt create mode 100644 ext/dom/tests/manually_call_constructor/text.phpt diff --git a/NEWS b/NEWS index c245c0bdc85c..4b74b53d913f 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ PHP NEWS . Fixed bug GH-11791 (Wrong default value of DOMDocument::xmlStandalone). (nielsdos) . Fix json_encode result on DOMDocument. (nielsdos) + . Fix manually calling __construct() on DOM classes. (nielsdos) - FFI: . Fix leaking definitions when using FFI::cdef()->new(...). (ilutov) diff --git a/ext/dom/attr.c b/ext/dom/attr.c index a262aea82139..399de6bfb90c 100644 --- a/ext/dom/attr.c +++ b/ext/dom/attr.c @@ -62,7 +62,7 @@ PHP_METHOD(DOMAttr, __construct) oldnode = dom_object_get_node(intern); if (oldnode != NULL) { - php_libxml_node_free_resource(oldnode ); + php_libxml_node_decrement_resource((php_libxml_node_object *)intern); } php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)nodep, (void *)intern); } diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c index e95e1a9030f3..08d4937341d1 100644 --- a/ext/dom/cdatasection.c +++ b/ext/dom/cdatasection.c @@ -52,7 +52,7 @@ PHP_METHOD(DOMCdataSection, __construct) intern = Z_DOMOBJ_P(ZEND_THIS); oldnode = dom_object_get_node(intern); if (oldnode != NULL) { - php_libxml_node_free_resource(oldnode ); + php_libxml_node_decrement_resource((php_libxml_node_object *)intern); } php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern); } diff --git a/ext/dom/comment.c b/ext/dom/comment.c index 76fe3200d462..16a52a5a4e24 100644 --- a/ext/dom/comment.c +++ b/ext/dom/comment.c @@ -50,13 +50,11 @@ PHP_METHOD(DOMComment, __construct) } intern = Z_DOMOBJ_P(ZEND_THIS); - if (intern != NULL) { - oldnode = dom_object_get_node(intern); - if (oldnode != NULL) { - php_libxml_node_free_resource(oldnode ); - } - php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)nodep, (void *)intern); + oldnode = dom_object_get_node(intern); + if (oldnode != NULL) { + php_libxml_node_decrement_resource((php_libxml_node_object *)intern); } + php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)nodep, (void *)intern); } /* }}} end DOMComment::__construct */ diff --git a/ext/dom/document.c b/ext/dom/document.c index ad98cf9a8501..ea6daafeb30f 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -1118,22 +1118,20 @@ PHP_METHOD(DOMDocument, __construct) } intern = Z_DOMOBJ_P(ZEND_THIS); - if (intern != NULL) { - olddoc = (xmlDocPtr) dom_object_get_node(intern); - if (olddoc != NULL) { - php_libxml_decrement_node_ptr((php_libxml_node_object *) intern); - refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern); - if (refcount != 0) { - olddoc->_private = NULL; - } - } - intern->document = NULL; - if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, docp) == -1) { - /* docp is always non-null so php_libxml_increment_doc_ref() never returns -1 */ - ZEND_UNREACHABLE(); + olddoc = (xmlDocPtr) dom_object_get_node(intern); + if (olddoc != NULL) { + php_libxml_decrement_node_ptr((php_libxml_node_object *) intern); + refcount = php_libxml_decrement_doc_ref((php_libxml_node_object *)intern); + if (refcount != 0) { + olddoc->_private = NULL; } - php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)docp, (void *)intern); } + intern->document = NULL; + if (php_libxml_increment_doc_ref((php_libxml_node_object *)intern, docp) == -1) { + /* docp is always non-null so php_libxml_increment_doc_ref() never returns -1 */ + ZEND_UNREACHABLE(); + } + php_libxml_increment_node_ptr((php_libxml_node_object *)intern, (xmlNodePtr)docp, (void *)intern); } /* }}} end DOMDocument::__construct */ diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index 274d69543538..033ee08aee17 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -50,9 +50,8 @@ PHP_METHOD(DOMDocumentFragment, __construct) intern = Z_DOMOBJ_P(ZEND_THIS); oldnode = dom_object_get_node(intern); if (oldnode != NULL) { - php_libxml_node_free_resource(oldnode ); + php_libxml_node_decrement_resource((php_libxml_node_object *)intern); } - /* php_dom_set_object(intern, nodep); */ php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern); } /* }}} end DOMDocumentFragment::__construct */ diff --git a/ext/dom/element.c b/ext/dom/element.c index 2379b81e1dd5..c630bec2b500 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -97,7 +97,7 @@ PHP_METHOD(DOMElement, __construct) intern = Z_DOMOBJ_P(ZEND_THIS); oldnode = dom_object_get_node(intern); if (oldnode != NULL) { - php_libxml_node_free_resource(oldnode ); + php_libxml_node_decrement_resource((php_libxml_node_object *)intern); } php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern); } diff --git a/ext/dom/entityreference.c b/ext/dom/entityreference.c index 16aadabfb599..61f0b92eedc2 100644 --- a/ext/dom/entityreference.c +++ b/ext/dom/entityreference.c @@ -57,13 +57,11 @@ PHP_METHOD(DOMEntityReference, __construct) } intern = Z_DOMOBJ_P(ZEND_THIS); - if (intern != NULL) { - oldnode = dom_object_get_node(intern); - if (oldnode != NULL) { - php_libxml_node_free_resource(oldnode ); - } - php_libxml_increment_node_ptr((php_libxml_node_object *)intern, node, (void *)intern); + oldnode = dom_object_get_node(intern); + if (oldnode != NULL) { + php_libxml_node_decrement_resource((php_libxml_node_object *)intern); } + php_libxml_increment_node_ptr((php_libxml_node_object *)intern, node, (void *)intern); } /* }}} end DOMEntityReference::__construct */ diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c index 465ecb431e73..a1c3d3a08783 100644 --- a/ext/dom/processinginstruction.c +++ b/ext/dom/processinginstruction.c @@ -59,7 +59,7 @@ PHP_METHOD(DOMProcessingInstruction, __construct) intern = Z_DOMOBJ_P(ZEND_THIS); oldnode = dom_object_get_node(intern); if (oldnode != NULL) { - php_libxml_node_free_resource(oldnode ); + php_libxml_node_decrement_resource((php_libxml_node_object *)intern); } php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern); } diff --git a/ext/dom/tests/DOMDocumentFragment_construct_basic_002.phpt b/ext/dom/tests/DOMDocumentFragment_construct_basic_002.phpt deleted file mode 100644 index 36a0762c16f0..000000000000 --- a/ext/dom/tests/DOMDocumentFragment_construct_basic_002.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -DOMDocumentFragment::__construct() called twice. ---CREDITS-- -Eric Lee Stewart -# TestFest Atlanta 2009-05-24 ---EXTENSIONS-- -dom ---FILE-- -__construct(); -var_dump($fragment); -?> ---EXPECT-- -object(DOMDocumentFragment)#1 (0) { -} diff --git a/ext/dom/tests/manually_call_constructor/attribute.phpt b/ext/dom/tests/manually_call_constructor/attribute.phpt new file mode 100644 index 000000000000..5e8be0abf747 --- /dev/null +++ b/ext/dom/tests/manually_call_constructor/attribute.phpt @@ -0,0 +1,34 @@ +--TEST-- +Manually call __construct() - attribute variation +--EXTENSIONS-- +dom +--FILE-- +nodeName, $attr->nodeValue); +$attr->__construct("newattribute", "my new value"); +var_dump($attr->nodeName, $attr->nodeValue); + +$doc = new DOMDocument(); +$doc->loadXML(<< + +XML); +$doc->documentElement->setAttributeNode($attr); +echo $doc->saveXML(); + +$attr->__construct("newnewattribute", "my even newer value"); +$doc->documentElement->setAttributeNode($attr); +echo $doc->saveXML(); + +?> +--EXPECT-- +string(9) "attribute" +string(8) "my value" +string(12) "newattribute" +string(12) "my new value" + + + + diff --git a/ext/dom/tests/manually_call_constructor/cdatasection.phpt b/ext/dom/tests/manually_call_constructor/cdatasection.phpt new file mode 100644 index 000000000000..01b8ab7ebd42 --- /dev/null +++ b/ext/dom/tests/manually_call_constructor/cdatasection.phpt @@ -0,0 +1,32 @@ +--TEST-- +Manually call __construct() - CDATA section variation +--EXTENSIONS-- +dom +--FILE-- +nodeValue); +$cdata->__construct("my new value"); +var_dump($cdata->nodeValue); + +$doc = new DOMDocument(); +$doc->loadXML(<< + +XML); +$doc->documentElement->appendChild($cdata); +echo $doc->saveXML(); + +$cdata->__construct("my even newer value"); +$doc->documentElement->appendChild($cdata); +echo $doc->saveXML(); + +?> +--EXPECT-- +string(8) "my value" +string(12) "my new value" + + + + diff --git a/ext/dom/tests/manually_call_constructor/comment.phpt b/ext/dom/tests/manually_call_constructor/comment.phpt new file mode 100644 index 000000000000..0abf6bcf6c1c --- /dev/null +++ b/ext/dom/tests/manually_call_constructor/comment.phpt @@ -0,0 +1,34 @@ +--TEST-- +Manually call __construct() - comment variation +--EXTENSIONS-- +dom +--FILE-- +nodeName, $comment->nodeValue); +$comment->__construct("my new value"); +var_dump($comment->nodeName, $comment->nodeValue); + +$doc = new DOMDocument(); +$doc->loadXML(<< + +XML); +$doc->documentElement->appendChild($comment); +echo $doc->saveXML(); + +$comment->__construct("my even newer value"); +$doc->documentElement->appendChild($comment); +echo $doc->saveXML(); + +?> +--EXPECT-- +string(8) "#comment" +string(8) "my value" +string(8) "#comment" +string(12) "my new value" + + + + diff --git a/ext/dom/tests/manually_call_constructor/document.phpt b/ext/dom/tests/manually_call_constructor/document.phpt new file mode 100644 index 000000000000..ce7aacc08b6e --- /dev/null +++ b/ext/dom/tests/manually_call_constructor/document.phpt @@ -0,0 +1,15 @@ +--TEST-- +Manually call __construct() - document variation +--EXTENSIONS-- +dom +--FILE-- +loadXML(''); +$doc->__construct("1.1", "UTF-8"); +echo $doc->saveXML(); + +?> +--EXPECT-- + diff --git a/ext/dom/tests/manually_call_constructor/documentfragment.phpt b/ext/dom/tests/manually_call_constructor/documentfragment.phpt new file mode 100644 index 000000000000..8e6f40d99518 --- /dev/null +++ b/ext/dom/tests/manually_call_constructor/documentfragment.phpt @@ -0,0 +1,32 @@ +--TEST-- +Manually call __construct() - document fragment variation +--EXTENSIONS-- +dom +--FILE-- +textContent); +$fragment->__construct(); +var_dump($fragment->textContent); + +$doc = new DOMDocument(); +$doc->loadXML(<< + +XML); +@$doc->documentElement->appendChild($fragment); +echo $doc->saveXML(); + +$fragment->__construct(); +@$doc->documentElement->appendChild($fragment); +echo $doc->saveXML(); + +?> +--EXPECT-- +string(0) "" +string(0) "" + + + + diff --git a/ext/dom/tests/manually_call_constructor/element.phpt b/ext/dom/tests/manually_call_constructor/element.phpt new file mode 100644 index 000000000000..9187340a4618 --- /dev/null +++ b/ext/dom/tests/manually_call_constructor/element.phpt @@ -0,0 +1,34 @@ +--TEST-- +Manually call __construct() - element variation +--EXTENSIONS-- +dom +--FILE-- +nodeName, $element->textContent); +$element->__construct('foo2', 'my new value'); +var_dump($element->nodeName, $element->textContent); + +$doc = new DOMDocument(); +$doc->loadXML(<< + +XML); +$doc->documentElement->appendChild($element); +echo $doc->saveXML(); + +$element->__construct('foo3', 'my new new value'); +$doc->documentElement->appendChild($element); +echo $doc->saveXML(); + +?> +--EXPECT-- +string(3) "foo" +string(8) "my value" +string(4) "foo2" +string(12) "my new value" + +my new value + +my new valuemy new new value diff --git a/ext/dom/tests/manually_call_constructor/entityreference.phpt b/ext/dom/tests/manually_call_constructor/entityreference.phpt new file mode 100644 index 000000000000..5bffda5fd023 --- /dev/null +++ b/ext/dom/tests/manually_call_constructor/entityreference.phpt @@ -0,0 +1,34 @@ +--TEST-- +Manually call __construct() - entity reference variation +--EXTENSIONS-- +dom +--FILE-- +nodeName, $entityRef->textContent); +$entityRef->__construct('foo2'); +var_dump($entityRef->nodeName, $entityRef->textContent); + +$doc = new DOMDocument(); +$doc->loadXML(<< + +XML); +$doc->documentElement->appendChild($entityRef); +echo $doc->saveXML(); + +$entityRef->__construct('foo3'); +$doc->documentElement->appendChild($entityRef); +echo $doc->saveXML(); + +?> +--EXPECT-- +string(3) "foo" +string(0) "" +string(4) "foo2" +string(0) "" + +&foo2; + +&foo2;&foo3; diff --git a/ext/dom/tests/manually_call_constructor/processinginstruction.phpt b/ext/dom/tests/manually_call_constructor/processinginstruction.phpt new file mode 100644 index 000000000000..11e7ab1e28d9 --- /dev/null +++ b/ext/dom/tests/manually_call_constructor/processinginstruction.phpt @@ -0,0 +1,34 @@ +--TEST-- +Manually call __construct() - processing instruction variation +--EXTENSIONS-- +dom +--FILE-- +target, $pi->data); +$pi->__construct('name2', 'value2'); +var_dump($pi->target, $pi->data); + +$doc = new DOMDocument(); +$doc->loadXML(<< + +XML); +$doc->documentElement->appendChild($pi); +echo $doc->saveXML(); + +$pi->__construct('name3', 'value3'); +$doc->documentElement->appendChild($pi); +echo $doc->saveXML(); + +?> +--EXPECT-- +string(5) "name1" +string(6) "value1" +string(5) "name2" +string(6) "value2" + + + + diff --git a/ext/dom/tests/manually_call_constructor/text.phpt b/ext/dom/tests/manually_call_constructor/text.phpt new file mode 100644 index 000000000000..b91b0f66e33d --- /dev/null +++ b/ext/dom/tests/manually_call_constructor/text.phpt @@ -0,0 +1,33 @@ +--TEST-- +Manually call __construct() - text variation +--EXTENSIONS-- +dom +--FILE-- +textContent); +$text->__construct('my new value'); +var_dump($text->textContent); + +$doc = new DOMDocument(); +$doc->loadXML(<< + +XML); +$doc->documentElement->appendChild($text); +echo $doc->saveXML(); + +$text->__construct("\nmy new new value"); +$doc->documentElement->appendChild($text); +echo $doc->saveXML(); + +?> +--EXPECT-- +string(8) "my value" +string(12) "my new value" + +my new value + +my new value +my new new value diff --git a/ext/dom/text.c b/ext/dom/text.c index e782ff8ff6c7..2a5630fa6088 100644 --- a/ext/dom/text.c +++ b/ext/dom/text.c @@ -51,13 +51,11 @@ PHP_METHOD(DOMText, __construct) } intern = Z_DOMOBJ_P(ZEND_THIS); - if (intern != NULL) { - oldnode = dom_object_get_node(intern); - if (oldnode != NULL) { - php_libxml_node_free_resource(oldnode ); - } - php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern); + oldnode = dom_object_get_node(intern); + if (oldnode != NULL) { + php_libxml_node_decrement_resource((php_libxml_node_object *)intern); } + php_libxml_increment_node_ptr((php_libxml_node_object *)intern, nodep, (void *)intern); } /* }}} end DOMText::__construct */ From dddd309da4567ae2c9e8a104f9606320d94a5ef8 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 5 Aug 2023 21:27:02 +0200 Subject: [PATCH 093/120] Fix GH-11830: ParentNode methods should perform their checks upfront Closes GH-11887. --- NEWS | 2 + ext/dom/parentnode.c | 149 ++++++++++-------- .../tests/gh11830/attribute_variation.phpt | 56 +++++++ ext/dom/tests/gh11830/document_variation.phpt | 71 +++++++++ .../tests/gh11830/hierarchy_variation.phpt | 62 ++++++++ ext/dom/tests/gh11830/type_variation.phpt | 60 +++++++ 6 files changed, 330 insertions(+), 70 deletions(-) create mode 100644 ext/dom/tests/gh11830/attribute_variation.phpt create mode 100644 ext/dom/tests/gh11830/document_variation.phpt create mode 100644 ext/dom/tests/gh11830/hierarchy_variation.phpt create mode 100644 ext/dom/tests/gh11830/type_variation.phpt diff --git a/NEWS b/NEWS index 4b74b53d913f..d6be46353372 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ PHP NEWS (nielsdos) . Fix json_encode result on DOMDocument. (nielsdos) . Fix manually calling __construct() on DOM classes. (nielsdos) + . Fixed bug GH-11830 (ParentNode methods should perform their checks + upfront). (nielsdos) - FFI: . Fix leaking definitions when using FFI::cdef()->new(...). (ilutov) diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index 8467fbf0603a..df14f194bcb0 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -141,26 +141,24 @@ static bool dom_is_node_in_list(const zval *nodes, int nodesc, const xmlNodePtr return false; } +static xmlDocPtr dom_doc_from_context_node(xmlNodePtr contextNode) +{ + if (contextNode->type == XML_DOCUMENT_NODE || contextNode->type == XML_HTML_DOCUMENT_NODE) { + return (xmlDocPtr) contextNode; + } else { + return contextNode->doc; + } +} + xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNode, zval *nodes, int nodesc) { int i; xmlDoc *documentNode; xmlNode *fragment; xmlNode *newNode; - zend_class_entry *ce; dom_object *newNodeObj; - int stricterror; - - if (document == NULL) { - php_dom_throw_error(HIERARCHY_REQUEST_ERR, 1); - return NULL; - } - if (contextNode->type == XML_DOCUMENT_NODE || contextNode->type == XML_HTML_DOCUMENT_NODE) { - documentNode = (xmlDoc *) contextNode; - } else { - documentNode = contextNode->doc; - } + documentNode = dom_doc_from_context_node(contextNode); fragment = xmlNewDocFragment(documentNode); @@ -168,80 +166,59 @@ xmlNode* dom_zvals_to_fragment(php_libxml_ref_obj *document, xmlNode *contextNod return NULL; } - stricterror = dom_get_strict_error(document); - for (i = 0; i < nodesc; i++) { if (Z_TYPE(nodes[i]) == IS_OBJECT) { - ce = Z_OBJCE(nodes[i]); + newNodeObj = Z_DOMOBJ_P(&nodes[i]); + newNode = dom_object_get_node(newNodeObj); - if (instanceof_function(ce, dom_node_class_entry)) { - newNodeObj = Z_DOMOBJ_P(&nodes[i]); - newNode = dom_object_get_node(newNodeObj); - - if (newNode->doc != documentNode) { - php_dom_throw_error(WRONG_DOCUMENT_ERR, stricterror); - goto err; - } + if (newNode->parent != NULL) { + xmlUnlinkNode(newNode); + } - if (newNode->parent != NULL) { - xmlUnlinkNode(newNode); - } + newNodeObj->document = document; + xmlSetTreeDoc(newNode, documentNode); - newNodeObj->document = document; - xmlSetTreeDoc(newNode, documentNode); + /* Citing from the docs (https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#xmlAddChild): + * "Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed)". + * So we must take a copy if this situation arises to prevent a use-after-free. */ + bool will_free = newNode->type == XML_TEXT_NODE && fragment->last && fragment->last->type == XML_TEXT_NODE; + if (will_free) { + newNode = xmlCopyNode(newNode, 1); + } - if (newNode->type == XML_ATTRIBUTE_NODE) { - goto hierarchy_request_err; + if (newNode->type == XML_DOCUMENT_FRAG_NODE) { + /* Unpack document fragment nodes, the behaviour differs for different libxml2 versions. */ + newNode = newNode->children; + while (newNode) { + xmlNodePtr next = newNode->next; + xmlUnlinkNode(newNode); + if (!xmlAddChild(fragment, newNode)) { + goto err; + } + newNode = next; } - - /* Citing from the docs (https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-tree.html#xmlAddChild): - * "Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed)". - * So we must take a copy if this situation arises to prevent a use-after-free. */ - bool will_free = newNode->type == XML_TEXT_NODE && fragment->last && fragment->last->type == XML_TEXT_NODE; + } else if (!xmlAddChild(fragment, newNode)) { if (will_free) { - newNode = xmlCopyNode(newNode, 1); - } - - if (newNode->type == XML_DOCUMENT_FRAG_NODE) { - /* Unpack document fragment nodes, the behaviour differs for different libxml2 versions. */ - newNode = newNode->children; - while (newNode) { - xmlNodePtr next = newNode->next; - xmlUnlinkNode(newNode); - if (!xmlAddChild(fragment, newNode)) { - goto hierarchy_request_err; - } - newNode = next; - } - } else if (!xmlAddChild(fragment, newNode)) { - if (will_free) { - xmlFreeNode(newNode); - } - goto hierarchy_request_err; + xmlFreeNode(newNode); } - } else { - zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_type_name(&nodes[i])); goto err; } - } else if (Z_TYPE(nodes[i]) == IS_STRING) { + } else { + ZEND_ASSERT(Z_TYPE(nodes[i]) == IS_STRING); + newNode = xmlNewDocText(documentNode, (xmlChar *) Z_STRVAL(nodes[i])); xmlSetTreeDoc(newNode, documentNode); if (!xmlAddChild(fragment, newNode)) { xmlFreeNode(newNode); - goto hierarchy_request_err; + goto err; } - } else { - zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_type_name(&nodes[i])); - goto err; } } return fragment; -hierarchy_request_err: - php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); err: xmlFreeNode(fragment); return NULL; @@ -264,17 +241,39 @@ static void dom_fragment_assign_parent_node(xmlNodePtr parentNode, xmlNodePtr fr fragment->last = NULL; } -static zend_result dom_hierarchy_node_list(xmlNodePtr parentNode, zval *nodes, int nodesc) +static zend_result dom_sanity_check_node_list_for_insertion(php_libxml_ref_obj *document, xmlNodePtr parentNode, zval *nodes, int nodesc) { + if (document == NULL) { + php_dom_throw_error(HIERARCHY_REQUEST_ERR, 1); + return FAILURE; + } + + xmlDocPtr documentNode = dom_doc_from_context_node(parentNode); + for (int i = 0; i < nodesc; i++) { - if (Z_TYPE(nodes[i]) == IS_OBJECT) { + zend_uchar type = Z_TYPE(nodes[i]); + if (type == IS_OBJECT) { const zend_class_entry *ce = Z_OBJCE(nodes[i]); if (instanceof_function(ce, dom_node_class_entry)) { - if (dom_hierarchy(parentNode, dom_object_get_node(Z_DOMOBJ_P(nodes + i))) != SUCCESS) { + xmlNodePtr node = dom_object_get_node(Z_DOMOBJ_P(nodes + i)); + + if (node->doc != documentNode) { + php_dom_throw_error(WRONG_DOCUMENT_ERR, dom_get_strict_error(document)); return FAILURE; } + + if (node->type == XML_ATTRIBUTE_NODE || dom_hierarchy(parentNode, node) != SUCCESS) { + php_dom_throw_error(HIERARCHY_REQUEST_ERR, dom_get_strict_error(document)); + return FAILURE; + } + } else { + zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_type_name(&nodes[i])); + return FAILURE; } + } else if (type != IS_STRING) { + zend_argument_type_error(i + 1, "must be of type DOMNode|string, %s given", zend_zval_type_name(&nodes[i])); + return FAILURE; } } @@ -286,8 +285,7 @@ void dom_parent_node_append(dom_object *context, zval *nodes, int nodesc) xmlNode *parentNode = dom_object_get_node(context); xmlNodePtr newchild, prevsib; - if (UNEXPECTED(dom_hierarchy_node_list(parentNode, nodes, nodesc) != SUCCESS)) { - php_dom_throw_error(HIERARCHY_REQUEST_ERR, dom_get_strict_error(context->document)); + if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { return; } @@ -329,8 +327,7 @@ void dom_parent_node_prepend(dom_object *context, zval *nodes, int nodesc) return; } - if (UNEXPECTED(dom_hierarchy_node_list(parentNode, nodes, nodesc) != SUCCESS)) { - php_dom_throw_error(HIERARCHY_REQUEST_ERR, dom_get_strict_error(context->document)); + if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { return; } @@ -414,6 +411,10 @@ void dom_parent_node_after(dom_object *context, zval *nodes, int nodesc) doc = prevsib->doc; + if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { + return; + } + /* Spec step 4: convert nodes into fragment */ fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); @@ -465,6 +466,10 @@ void dom_parent_node_before(dom_object *context, zval *nodes, int nodesc) doc = nextsib->doc; + if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { + return; + } + /* Spec step 4: convert nodes into fragment */ fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); @@ -555,6 +560,10 @@ void dom_child_replace_with(dom_object *context, zval *nodes, int nodesc) xmlNodePtr insertion_point = child->next; + if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { + return; + } + xmlNodePtr fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); if (UNEXPECTED(fragment == NULL)) { return; diff --git a/ext/dom/tests/gh11830/attribute_variation.phpt b/ext/dom/tests/gh11830/attribute_variation.phpt new file mode 100644 index 000000000000..34a6f094f58f --- /dev/null +++ b/ext/dom/tests/gh11830/attribute_variation.phpt @@ -0,0 +1,56 @@ +--TEST-- +GH-11830 (ParentNode methods should perform their checks upfront) - attribute variation +--EXTENSIONS-- +dom +--FILE-- +loadXML(<< + + + +XML); + +try { + $doc->documentElement->firstElementChild->prepend($doc->documentElement->attributes[0]); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->append($doc->documentElement->attributes[0]); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->before($doc->documentElement->attributes[0]); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->after($doc->documentElement->attributes[0]); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->replaceWith($doc->documentElement->attributes[0]); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +echo $doc->saveXML(); +?> +--EXPECT-- +Hierarchy Request Error +Hierarchy Request Error +Hierarchy Request Error +Hierarchy Request Error +Hierarchy Request Error + + + + diff --git a/ext/dom/tests/gh11830/document_variation.phpt b/ext/dom/tests/gh11830/document_variation.phpt new file mode 100644 index 000000000000..89eed3dff22c --- /dev/null +++ b/ext/dom/tests/gh11830/document_variation.phpt @@ -0,0 +1,71 @@ +--TEST-- +GH-11830 (ParentNode methods should perform their checks upfront) - document variation +--EXTENSIONS-- +dom +--FILE-- +loadXML(<< + +XML); + +$otherElement = $otherDoc->documentElement; + +$doc = new DOMDocument; +$doc->loadXML(<< + + + + +XML); + +$testElement = $doc->documentElement->firstElementChild->nextElementSibling->firstElementChild; + +try { + $doc->documentElement->firstElementChild->prepend($testElement, $otherElement); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->append($testElement, $otherElement); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->before($testElement, $otherElement); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->after($testElement, $otherElement); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->replaceWith($testElement, $otherElement); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +echo $otherDoc->saveXML(); +echo $doc->saveXML(); +?> +--EXPECT-- +Wrong Document Error +Wrong Document Error +Wrong Document Error +Wrong Document Error +Wrong Document Error + + + + + + + diff --git a/ext/dom/tests/gh11830/hierarchy_variation.phpt b/ext/dom/tests/gh11830/hierarchy_variation.phpt new file mode 100644 index 000000000000..bd6534ee71b1 --- /dev/null +++ b/ext/dom/tests/gh11830/hierarchy_variation.phpt @@ -0,0 +1,62 @@ +--TEST-- +GH-11830 (ParentNode methods should perform their checks upfront) - hierarchy variation +--EXTENSIONS-- +dom +--FILE-- +loadXML(<< + + + + +XML); + +$container = $doc->documentElement; +$alone = $container->firstElementChild; +$testElement = $alone->nextElementSibling->firstElementChild; + +try { + $testElement->prepend($alone, $container); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $testElement->append($alone, $container); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $testElement->before($alone, $container); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $testElement->after($alone, $container); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +try { + $testElement->replaceWith($alone, $container); +} catch (\DOMException $e) { + echo $e->getMessage(), "\n"; +} + +echo $doc->saveXML(); +?> +--EXPECT-- +Hierarchy Request Error +Hierarchy Request Error +Hierarchy Request Error +Hierarchy Request Error +Hierarchy Request Error + + + + + diff --git a/ext/dom/tests/gh11830/type_variation.phpt b/ext/dom/tests/gh11830/type_variation.phpt new file mode 100644 index 000000000000..76732775e6db --- /dev/null +++ b/ext/dom/tests/gh11830/type_variation.phpt @@ -0,0 +1,60 @@ +--TEST-- +GH-11830 (ParentNode methods should perform their checks upfront) - type variation +--EXTENSIONS-- +dom +--FILE-- +loadXML(<< + + + + +XML); + +$testElement = $doc->documentElement->firstElementChild->nextElementSibling->firstElementChild; + +try { + $doc->documentElement->firstElementChild->prepend($testElement, 0); +} catch (\TypeError $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->append($testElement, true); +} catch (\TypeError $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->before($testElement, null); +} catch (\TypeError $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->after($testElement, new stdClass); +} catch (\TypeError $e) { + echo $e->getMessage(), "\n"; +} + +try { + $doc->documentElement->firstElementChild->replaceWith($testElement, []); +} catch (\TypeError $e) { + echo $e->getMessage(), "\n"; +} + +echo $doc->saveXML(); +?> +--EXPECT-- +DOMElement::prepend(): Argument #2 must be of type DOMNode|string, int given +DOMElement::append(): Argument #2 must be of type DOMNode|string, bool given +DOMElement::before(): Argument #2 must be of type DOMNode|string, null given +DOMElement::after(): Argument #2 must be of type DOMNode|string, stdClass given +DOMElement::replaceWith(): Argument #2 must be of type DOMNode|string, array given + + + + + From 5018dfecdf85724f0244e3b59646b4c236fd7492 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sun, 6 Aug 2023 14:44:15 +0200 Subject: [PATCH 094/120] Remove useless hashmap check php_libxml_unlink_entity is called from a hashmap iterator, so using xmlHashLookup to check if it comes from that hashmap will always be true. --- ext/libxml/libxml.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index a8de9bd6d65e..97ceec45ddbf 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -107,9 +107,7 @@ static void php_libxml_unlink_entity(void *data, void *table, const xmlChar *nam { xmlEntityPtr entity = data; if (entity->_private != NULL) { - if (xmlHashLookup(table, name) == entity) { - xmlHashRemoveEntry(table, name, NULL); - } + xmlHashRemoveEntry(table, name, NULL); } } From 96885bc04f04b7e43c0a5daa2e392647fd0d1353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sat, 5 Aug 2023 18:03:46 +0200 Subject: [PATCH 095/120] fix: handle the GNU specific version of strerror_r Close GH-11882 --- NEWS | 3 +++ Zend/zend.c | 12 +++++++++--- configure.ac | 4 +++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index d6be46353372..122e709a9a9f 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ PHP NEWS . Fixed bug GH-10964 (Improve man page about the built-in server). (Alexandre Daubois) +- Core: + . Fixed strerror_r detection at configuration time. (Kévin Dunglas) + - DOM: . Fix DOMEntity field getter bugs. (nielsdos) . Fix incorrect attribute existence check in DOMElement::setAttributeNodeNS. diff --git a/Zend/zend.c b/Zend/zend.c index a1b4e3ee3973..351e9ac5eea7 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -1649,9 +1649,15 @@ ZEND_API ZEND_COLD ZEND_NORETURN void zend_error_noreturn(int type, const char * ZEND_API ZEND_COLD ZEND_NORETURN void zend_strerror_noreturn(int type, int errn, const char *message) { -#ifdef HAVE_STR_ERROR_R - char buf[1024]; - strerror_r(errn, buf, sizeof(buf)); +#ifdef HAVE_STRERROR_R + char b[1024]; + +# ifdef STRERROR_R_CHAR_P + char *buf = strerror_r(errn, b, sizeof(b)); +# else + strerror_r(errn, b, sizeof(b)); + char *buf = b; +# endif #else char *buf = strerror(errn); #endif diff --git a/configure.ac b/configure.ac index 6cf6370fca3b..6d6d44e0597c 100644 --- a/configure.ac +++ b/configure.ac @@ -621,9 +621,11 @@ vasprintf \ asprintf \ nanosleep \ memmem \ -strerror_r \ ) +dnl Check for strerror_r, and if its a POSIX-compatible or a GNU specific version. +AC_FUNC_STRERROR_R + AX_FUNC_WHICH_GETHOSTBYNAME_R dnl Some systems (like OpenSolaris) do not have nanosleep in libc. From 815b5ad50167b48ddeb8f2198fb61b411fec9efe Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 5 Aug 2023 21:53:45 +0200 Subject: [PATCH 096/120] Fix viable next sibling search for replaceWith Closes GH-11888. --- NEWS | 1 + ext/dom/parentnode.c | 24 +++++++++++-- .../replaceWith_non_viable_next_sibling.phpt | 36 +++++++++++++++++++ 3 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 ext/dom/tests/replaceWith_non_viable_next_sibling.phpt diff --git a/NEWS b/NEWS index d6be46353372..2a441a9260c0 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,7 @@ PHP NEWS . Fix manually calling __construct() on DOM classes. (nielsdos) . Fixed bug GH-11830 (ParentNode methods should perform their checks upfront). (nielsdos) + . Fix viable next sibling search for replaceWith. (nielsdos) - FFI: . Fix leaking definitions when using FFI::cdef()->new(...). (ilutov) diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index df14f194bcb0..4f3187db9697 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -550,25 +550,45 @@ void dom_child_node_remove(dom_object *context) void dom_child_replace_with(dom_object *context, zval *nodes, int nodesc) { + /* Spec link: https://dom.spec.whatwg.org/#dom-childnode-replacewith */ + xmlNodePtr child = dom_object_get_node(context); + + /* Spec step 1 */ xmlNodePtr parentNode = child->parent; + /* Spec step 2 */ + if (!parentNode) { + int stricterror = dom_get_strict_error(context->document); + php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); + return; + } int stricterror = dom_get_strict_error(context->document); if (UNEXPECTED(dom_child_removal_preconditions(child, stricterror) != SUCCESS)) { return; } - xmlNodePtr insertion_point = child->next; + /* Spec step 3: find first following child not in nodes; otherwise null */ + xmlNodePtr viable_next_sibling = child->next; + while (viable_next_sibling) { + if (!dom_is_node_in_list(nodes, nodesc, viable_next_sibling)) { + break; + } + viable_next_sibling = viable_next_sibling->next; + } if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { return; } + /* Spec step 4: convert nodes into fragment */ xmlNodePtr fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); if (UNEXPECTED(fragment == NULL)) { return; } + /* Spec step 5: perform the replacement */ + xmlNodePtr newchild = fragment->children; xmlDocPtr doc = parentNode->doc; @@ -580,7 +600,7 @@ void dom_child_replace_with(dom_object *context, zval *nodes, int nodesc) if (newchild) { xmlNodePtr last = fragment->last; - dom_pre_insert(insertion_point, parentNode, newchild, fragment); + dom_pre_insert(viable_next_sibling, parentNode, newchild, fragment); dom_fragment_assign_parent_node(parentNode, fragment); dom_reconcile_ns_list(doc, newchild, last); diff --git a/ext/dom/tests/replaceWith_non_viable_next_sibling.phpt b/ext/dom/tests/replaceWith_non_viable_next_sibling.phpt new file mode 100644 index 000000000000..f0ee54c78d85 --- /dev/null +++ b/ext/dom/tests/replaceWith_non_viable_next_sibling.phpt @@ -0,0 +1,36 @@ +--TEST-- +replaceWith() with a non-viable next sibling +--EXTENSIONS-- +dom +--FILE-- +loadXML(<< + + + + + +XML); + +$container = $doc->documentElement; +$child = $container->firstElementChild; +$alone = $child->firstElementChild; + +$child->after($alone); +echo $doc->saveXML(); +$child->replaceWith($alone); +echo $doc->saveXML(); +?> +--EXPECT-- + + + + + + + + + + From df6e8bd4fd5ef61a3bfb2de3a669ecf755282696 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Sat, 5 Aug 2023 21:53:45 +0200 Subject: [PATCH 097/120] Fix viable next sibling search for replaceWith Closes GH-11888. --- ext/dom/parentnode.c | 24 +++++++++++-- .../replaceWith_non_viable_next_sibling.phpt | 36 +++++++++++++++++++ 2 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 ext/dom/tests/replaceWith_non_viable_next_sibling.phpt diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index df14f194bcb0..4f3187db9697 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -550,25 +550,45 @@ void dom_child_node_remove(dom_object *context) void dom_child_replace_with(dom_object *context, zval *nodes, int nodesc) { + /* Spec link: https://dom.spec.whatwg.org/#dom-childnode-replacewith */ + xmlNodePtr child = dom_object_get_node(context); + + /* Spec step 1 */ xmlNodePtr parentNode = child->parent; + /* Spec step 2 */ + if (!parentNode) { + int stricterror = dom_get_strict_error(context->document); + php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); + return; + } int stricterror = dom_get_strict_error(context->document); if (UNEXPECTED(dom_child_removal_preconditions(child, stricterror) != SUCCESS)) { return; } - xmlNodePtr insertion_point = child->next; + /* Spec step 3: find first following child not in nodes; otherwise null */ + xmlNodePtr viable_next_sibling = child->next; + while (viable_next_sibling) { + if (!dom_is_node_in_list(nodes, nodesc, viable_next_sibling)) { + break; + } + viable_next_sibling = viable_next_sibling->next; + } if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { return; } + /* Spec step 4: convert nodes into fragment */ xmlNodePtr fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); if (UNEXPECTED(fragment == NULL)) { return; } + /* Spec step 5: perform the replacement */ + xmlNodePtr newchild = fragment->children; xmlDocPtr doc = parentNode->doc; @@ -580,7 +600,7 @@ void dom_child_replace_with(dom_object *context, zval *nodes, int nodesc) if (newchild) { xmlNodePtr last = fragment->last; - dom_pre_insert(insertion_point, parentNode, newchild, fragment); + dom_pre_insert(viable_next_sibling, parentNode, newchild, fragment); dom_fragment_assign_parent_node(parentNode, fragment); dom_reconcile_ns_list(doc, newchild, last); diff --git a/ext/dom/tests/replaceWith_non_viable_next_sibling.phpt b/ext/dom/tests/replaceWith_non_viable_next_sibling.phpt new file mode 100644 index 000000000000..f0ee54c78d85 --- /dev/null +++ b/ext/dom/tests/replaceWith_non_viable_next_sibling.phpt @@ -0,0 +1,36 @@ +--TEST-- +replaceWith() with a non-viable next sibling +--EXTENSIONS-- +dom +--FILE-- +loadXML(<< + + + + + +XML); + +$container = $doc->documentElement; +$child = $container->firstElementChild; +$alone = $child->firstElementChild; + +$child->after($alone); +echo $doc->saveXML(); +$child->replaceWith($alone); +echo $doc->saveXML(); +?> +--EXPECT-- + + + + + + + + + + From ba35ff08934b8806c3c725a6ea5f27fa77dc47e0 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Tue, 8 Aug 2023 00:51:56 +0200 Subject: [PATCH 098/120] Remove unused HAVE_GCC_GLOBAL_REGS shell variable (#11877) --- Zend/Zend.m4 | 2 -- 1 file changed, 2 deletions(-) diff --git a/Zend/Zend.m4 b/Zend/Zend.m4 index 3c4a8019fcb4..1c3e13acff44 100644 --- a/Zend/Zend.m4 +++ b/Zend/Zend.m4 @@ -381,8 +381,6 @@ int emu(const opcode_handler_t *ip, void *fp) { fi if test "$ZEND_GCC_GLOBAL_REGS" = "yes"; then AC_DEFINE([HAVE_GCC_GLOBAL_REGS], 1, [Define if the target system has support for global register variables]) -else - HAVE_GCC_GLOBAL_REGS=no fi AC_MSG_RESULT($ZEND_GCC_GLOBAL_REGS) From 77252afaf0488f4e4f1440b7a4d32b6be2fa13eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 8 Aug 2023 08:52:41 +0200 Subject: [PATCH 099/120] Fix return type of odbc_data_source() --- ext/odbc/odbc.stub.php | 2 +- ext/odbc/odbc_arginfo.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index ca0ca2301d7a..8f4c637dd75e 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -24,7 +24,7 @@ function odbc_cursor($statement): string|false {} #ifdef HAVE_SQLDATASOURCES /** @param resource $odbc */ -function odbc_data_source($odbc, int $fetch_type): array|false {} +function odbc_data_source($odbc, int $fetch_type): array|null|false {} #endif /** diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index b374007b6521..0431e818c828 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 27a50ba79ed632721ee458527ef543e4b44ee897 */ + * Stub hash: 245f4e9679e4da2fe2890bca50f36cd48e8a496c */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -29,7 +29,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_cursor, 0, 1, MAY_BE_STRING ZEND_END_ARG_INFO() #if defined(HAVE_SQLDATASOURCES) -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_data_source, 0, 2, MAY_BE_ARRAY|MAY_BE_FALSE) +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_data_source, 0, 2, MAY_BE_ARRAY|MAY_BE_NULL|MAY_BE_FALSE) ZEND_ARG_INFO(0, odbc) ZEND_ARG_TYPE_INFO(0, fetch_type, IS_LONG, 0) ZEND_END_ARG_INFO() From cbfd73765a0a867caa984afcc6b8257879242d53 Mon Sep 17 00:00:00 2001 From: Athos Ribeiro Date: Thu, 3 Aug 2023 22:27:49 -0300 Subject: [PATCH 100/120] Fix off-by-one bug when truncating tempnam prefix The tempnam documentation currently states that "Only the first 63 characters of the prefix are used, the rest are ignored". However when the prefix is 64 characters-long, the current implementation fails to strip the last character, diverging from the documented behavior. This patch fixes the implementation so it matches the documented behavior for that specific case where the prefix is 64 characters long. Closes GH-11870 Signed-off-by: George Peter Banyard --- NEWS | 2 + ext/standard/file.c | 2 +- .../tests/file/tempnam_variation9.phpt | 73 +++++++++++++++++++ 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 ext/standard/tests/file/tempnam_variation9.phpt diff --git a/NEWS b/NEWS index 122e709a9a9f..8007ebceaeac 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,8 @@ PHP NEWS - Standard: . Prevent int overflow on $decimals in number_format. (Marc Bennewitz) + . Fixed bug GH-11870 (Fix off-by-one bug when truncating tempnam prefix) + (athos-ribeiro) 03 Aug 2023, PHP 8.1.22 diff --git a/ext/standard/file.c b/ext/standard/file.c index d51a584ed9c7..8bab36096b1c 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -834,7 +834,7 @@ PHP_FUNCTION(tempnam) ZEND_PARSE_PARAMETERS_END(); p = php_basename(prefix, prefix_len, NULL, 0); - if (ZSTR_LEN(p) > 64) { + if (ZSTR_LEN(p) >= 64) { ZSTR_VAL(p)[63] = '\0'; } diff --git a/ext/standard/tests/file/tempnam_variation9.phpt b/ext/standard/tests/file/tempnam_variation9.phpt new file mode 100644 index 000000000000..bea936462294 --- /dev/null +++ b/ext/standard/tests/file/tempnam_variation9.phpt @@ -0,0 +1,73 @@ +--TEST-- +Test tempnam() function: usage variations - test prefix maximum size +--SKIPIF-- + +--FILE-- +$prefix) { + echo "-- Iteration $i --\n"; + try { + $file_name = tempnam("$file_path", $prefix); + } catch (Error $e) { + echo $e->getMessage(), "\n"; + continue; + } + + $base_name = basename($file_name); + echo "File name is => ", $base_name, "\n"; + echo "File name length is => ", strlen($base_name), "\n"; + + if (file_exists($file_name)) { + unlink($file_name); + } +} +rmdir($file_path); + +?> +--CLEAN-- + +--EXPECTF-- +*** Testing tempnam() maximum prefix size *** +-- Iteration 0 -- +File name is => begin_%rx{7}%r_end%r.{6}%r +File name length is => 23 +-- Iteration 1 -- +File name is => begin_%rx{53}%r_end%r.{6}%r +File name length is => 69 +-- Iteration 2 -- +File name is => begin_%rx{54}%r_en%r.{6}%r +File name length is => 69 +-- Iteration 3 -- +File name is => begin_%rx{55}%r_e%r.{6}%r +File name length is => 69 +-- Iteration 4 -- +File name is => begin_%rx{57}%r%r.{6}%r +File name length is => 69 From 417f3fdb91b4c92f35b9065183369088b14af6d9 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois <2144837+alexandre-daubois@users.noreply.github.com> Date: Tue, 8 Aug 2023 10:49:02 +0200 Subject: [PATCH 101/120] Improve `ext/pdo_sqlite` tests cleanup (#11900) --- ext/pdo_sqlite/tests/bug33841.phpt | 12 +++++-- ext/pdo_sqlite/tests/bug35336.phpt | 6 ++-- ext/pdo_sqlite/tests/bug38334.phpt | 14 ++++---- ext/pdo_sqlite/tests/bug70862.phpt | 4 +-- ext/pdo_sqlite/tests/bug_42589.phpt | 10 +++--- ext/pdo_sqlite/tests/pdo_035.phpt | 6 ++-- ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt | 34 +++++++++---------- .../tests/pdo_sqlite_empty_filename.phpt | 4 +-- .../tests/pdo_sqlite_filename_uri.phpt | 8 ++--- .../tests/pdo_sqlite_open_basedir.phpt | 2 +- .../tests/pdo_sqlite_open_flags.phpt | 4 +-- .../pdo_sqlite_statement_getattribute.phpt | 2 +- 12 files changed, 56 insertions(+), 50 deletions(-) diff --git a/ext/pdo_sqlite/tests/bug33841.phpt b/ext/pdo_sqlite/tests/bug33841.phpt index cacdb9910ca7..6f8cec57947f 100644 --- a/ext/pdo_sqlite/tests/bug33841.phpt +++ b/ext/pdo_sqlite/tests/bug33841.phpt @@ -7,18 +7,24 @@ pdo_sqlite require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; $db = PDOTest::test_factory(__DIR__ . '/common.phpt'); -$db->exec('CREATE TABLE test (text)'); +$db->exec('CREATE TABLE test_33841 (text)'); -$stmt = $db->prepare("INSERT INTO test VALUES ( :text )"); +$stmt = $db->prepare("INSERT INTO test_33841 VALUES ( :text )"); $stmt->bindParam(':text', $name); $name = 'test1'; var_dump($stmt->execute(), $stmt->rowCount()); -$stmt = $db->prepare("UPDATE test SET text = :text "); +$stmt = $db->prepare("UPDATE test_33841 SET text = :text "); $stmt->bindParam(':text', $name); $name = 'test2'; var_dump($stmt->execute(), $stmt->rowCount()); ?> +--CLEAN-- +exec('DROP TABLE IF EXISTS test_33841'); +?> --EXPECT-- bool(true) int(1) diff --git a/ext/pdo_sqlite/tests/bug35336.phpt b/ext/pdo_sqlite/tests/bug35336.phpt index 33bd6691dace..fb0495056325 100644 --- a/ext/pdo_sqlite/tests/bug35336.phpt +++ b/ext/pdo_sqlite/tests/bug35336.phpt @@ -11,10 +11,10 @@ class EEE { } $a = new PDO("sqlite::memory:");// pool ("sqlite::memory:"); -$a->query ("CREATE TABLE test (a integer primary key, b text)"); -$b = $a->prepare("insert into test (b) values (?)"); +$a->query ("CREATE TABLE test_35336 (a integer primary key, b text)"); +$b = $a->prepare("insert into test_35336 (b) values (?)"); $b->execute(array (5)); -$rez = $a->query ("SELECT * FROM test")->fetchAll(PDO::FETCH_CLASS, 'EEE'); +$rez = $a->query ("SELECT * FROM test_35336")->fetchAll(PDO::FETCH_CLASS, 'EEE'); echo "Done\n"; ?> diff --git a/ext/pdo_sqlite/tests/bug38334.phpt b/ext/pdo_sqlite/tests/bug38334.phpt index 92670f34c46e..b4e9a378d717 100644 --- a/ext/pdo_sqlite/tests/bug38334.phpt +++ b/ext/pdo_sqlite/tests/bug38334.phpt @@ -6,13 +6,13 @@ pdo_sqlite exec('CREATE TABLE test (i INTEGER , f DOUBLE, s VARCHAR(255))'); -$db->exec('INSERT INTO test VALUES (42, 46.7, "test")'); -var_dump($db->query('SELECT * FROM test')->fetch(PDO::FETCH_ASSOC)); +$db->exec('CREATE TABLE test_38334 (i INTEGER , f DOUBLE, s VARCHAR(255))'); +$db->exec('INSERT INTO test_38334 VALUES (42, 46.7, "test")'); +var_dump($db->query('SELECT * FROM test_38334')->fetch(PDO::FETCH_ASSOC)); // Check handling of integers larger than 32-bit. -$db->exec('INSERT INTO test VALUES (10000000000, 0.0, "")'); -$i = $db->query('SELECT i FROM test WHERE f = 0.0')->fetchColumn(0); +$db->exec('INSERT INTO test_38334 VALUES (10000000000, 0.0, "")'); +$i = $db->query('SELECT i FROM test_38334 WHERE f = 0.0')->fetchColumn(0); if (PHP_INT_SIZE >= 8) { var_dump($i === 10000000000); } else { @@ -20,8 +20,8 @@ if (PHP_INT_SIZE >= 8) { } // Check storing of strings into integer/float columns. -$db->exec('INSERT INTO test VALUES ("test", "test", "x")'); -var_dump($db->query('SELECT * FROM test WHERE s = "x"')->fetch(PDO::FETCH_ASSOC)); +$db->exec('INSERT INTO test_38334 VALUES ("test", "test", "x")'); +var_dump($db->query('SELECT * FROM test_38334 WHERE s = "x"')->fetch(PDO::FETCH_ASSOC)); ?> --EXPECT-- diff --git a/ext/pdo_sqlite/tests/bug70862.phpt b/ext/pdo_sqlite/tests/bug70862.phpt index 5becca7c7591..802f16ed58de 100644 --- a/ext/pdo_sqlite/tests/bug70862.phpt +++ b/ext/pdo_sqlite/tests/bug70862.phpt @@ -8,7 +8,7 @@ pdo_sqlite $db = new PDO('sqlite::memory:'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); -$db->exec('CREATE TABLE test(field BLOB)'); +$db->exec('CREATE TABLE test_70862(field BLOB)'); $db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0); $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); @@ -24,7 +24,7 @@ stream_wrapper_register("hello", "HelloWrapper"); $f = fopen("hello://there", "r"); -$stmt = $db->prepare('INSERT INTO test(field) VALUES (:para)'); +$stmt = $db->prepare('INSERT INTO test_70862(field) VALUES (:para)'); $stmt->bindParam(":para", $f, PDO::PARAM_LOB); $stmt->execute(); diff --git a/ext/pdo_sqlite/tests/bug_42589.phpt b/ext/pdo_sqlite/tests/bug_42589.phpt index 45c1fa0a221c..46ded8d027a6 100644 --- a/ext/pdo_sqlite/tests/bug_42589.phpt +++ b/ext/pdo_sqlite/tests/bug_42589.phpt @@ -14,15 +14,15 @@ if(!in_array('ENABLE_COLUMN_METADATA', $options, true)) exec('CREATE TABLE test (field1 VARCHAR(10))'); -$db->exec('INSERT INTO test VALUES("test")'); +$db->exec('CREATE TABLE test_42589 (field1 VARCHAR(10))'); +$db->exec('INSERT INTO test_42589 VALUES("test")'); -$result = $db->query('SELECT * FROM test t1 LEFT JOIN test t2 ON t1.field1 = t2.field1'); +$result = $db->query('SELECT * FROM test_42589 t1 LEFT JOIN test_42589 t2 ON t1.field1 = t2.field1'); $meta1 = $result->getColumnMeta(0); $meta2 = $result->getColumnMeta(1); -var_dump(!empty($meta1['table']) && $meta1['table'] == 'test'); -var_dump(!empty($meta2['table']) && $meta2['table'] == 'test'); +var_dump(!empty($meta1['table']) && $meta1['table'] == 'test_42589'); +var_dump(!empty($meta2['table']) && $meta2['table'] == 'test_42589'); ?> --EXPECT-- bool(true) diff --git a/ext/pdo_sqlite/tests/pdo_035.phpt b/ext/pdo_sqlite/tests/pdo_035.phpt index ec723842f03b..3541b64ae9eb 100644 --- a/ext/pdo_sqlite/tests/pdo_035.phpt +++ b/ext/pdo_sqlite/tests/pdo_035.phpt @@ -5,10 +5,10 @@ pdo_sqlite --FILE-- exec('CREATE TABLE test (id int)'); -$db->exec('INSERT INTO test VALUES (23)'); +$db->exec('CREATE TABLE test_pdo_035 (id int)'); +$db->exec('INSERT INTO test_pdo_035 VALUES (23)'); -$stmt = $db->prepare('SELECT id FROM test'); +$stmt = $db->prepare('SELECT id FROM test_pdo_035'); $stmt->execute(); $result = $stmt->fetch(PDO::FETCH_LAZY); diff --git a/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt b/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt index 5a5b728a5e62..e3373df8ac3b 100644 --- a/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt +++ b/ext/pdo_sqlite/tests/pdo_fetch_func_001.phpt @@ -8,46 +8,46 @@ pdo_sqlite $db = new PDO('sqlite::memory:'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); -$db->exec('CREATE TABLE testing (id INTEGER , name VARCHAR)'); -$db->exec('INSERT INTO testing VALUES(1, "php")'); -$db->exec('INSERT INTO testing VALUES(2, "")'); +$db->exec('CREATE TABLE test_fetch_func_001 (id INTEGER , name VARCHAR)'); +$db->exec('INSERT INTO test_fetch_func_001 VALUES(1, "php")'); +$db->exec('INSERT INTO test_fetch_func_001 VALUES(2, "")'); -$st = $db->query('SELECT * FROM testing'); +$st = $db->query('SELECT * FROM test_fetch_func_001'); $st->fetchAll(PDO::FETCH_FUNC, function($x, $y) use ($st) { var_dump($st); print "data: $x, $y\n"; }); -$st = $db->query('SELECT name FROM testing'); +$st = $db->query('SELECT name FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, 'strtoupper')); try { - $st = $db->query('SELECT * FROM testing'); + $st = $db->query('SELECT * FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, 'nothing')); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { - $st = $db->query('SELECT * FROM testing'); + $st = $db->query('SELECT * FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, '')); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { - $st = $db->query('SELECT * FROM testing'); + $st = $db->query('SELECT * FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, NULL)); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { - $st = $db->query('SELECT * FROM testing'); + $st = $db->query('SELECT * FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, 1)); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { - $st = $db->query('SELECT * FROM testing'); + $st = $db->query('SELECT * FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('self', 'foo'))); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; @@ -60,7 +60,7 @@ class foo { } class bar extends foo { public function __construct($db) { - $st = $db->query('SELECT * FROM testing'); + $st = $db->query('SELECT * FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array($this, 'parent::method'))); } @@ -79,25 +79,25 @@ class bar extends foo { new bar($db); -$st = $db->query('SELECT * FROM testing'); +$st = $db->query('SELECT * FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test'))); try { - $st = $db->query('SELECT * FROM testing'); + $st = $db->query('SELECT * FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test2'))); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { - $st = $db->query('SELECT * FROM testing'); + $st = $db->query('SELECT * FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'test3'))); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; } try { - $st = $db->query('SELECT * FROM testing'); + $st = $db->query('SELECT * FROM test_fetch_func_001'); var_dump($st->fetchAll(PDO::FETCH_FUNC, array('bar', 'inexistent'))); } catch (\TypeError $e) { echo $e->getMessage(), \PHP_EOL; @@ -107,12 +107,12 @@ try { --EXPECTF-- object(PDOStatement)#%d (1) { ["queryString"]=> - string(21) "SELECT * FROM testing" + string(33) "SELECT * FROM test_fetch_func_001" } data: 1, php object(PDOStatement)#%d (1) { ["queryString"]=> - string(21) "SELECT * FROM testing" + string(33) "SELECT * FROM test_fetch_func_001" } data: 2, array(2) { diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_empty_filename.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_empty_filename.phpt index 8e474feabd30..ab56477939cc 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_empty_filename.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_empty_filename.phpt @@ -8,12 +8,12 @@ pdo_sqlite // create with empty filename $db = new PDO('sqlite:'); -var_dump($db->exec('CREATE TABLE test1 (id INT);')); +var_dump($db->exec('CREATE TABLE test_sqlite_empty_filename (id INT);')); // create with empty URI $db = new PDO('sqlite:file:?cache=shared'); -var_dump($db->exec('CREATE TABLE test1 (id INT);')); +var_dump($db->exec('CREATE TABLE test_sqlite_empty_filename (id INT);')); ?> --EXPECT-- int(0) diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_filename_uri.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_filename_uri.phpt index b972be27cfbf..97c1b30f8996 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_filename_uri.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_filename_uri.phpt @@ -8,26 +8,26 @@ pdo_sqlite // create with in-memory database using shared cached $db = new PDO('sqlite:file::memory:?cache=shared'); -var_dump($db->exec('CREATE TABLE test1 (id INT);')); +var_dump($db->exec('CREATE TABLE test_sqlite_filename_uri (id INT);')); // create second connection to in-memory database $db = new PDO('sqlite:file::memory:?cache=shared'); -var_dump($db->exec('SELECT * from test1')); +var_dump($db->exec('SELECT * from test_sqlite_filename_uri')); // create with default read-write|create mode $filename = "file:" . __DIR__ . DIRECTORY_SEPARATOR . "pdo_sqlite_filename_uri.db"; $db = new PDO('sqlite:' . $filename); -var_dump($db->exec('CREATE TABLE test1 (id INT);')); +var_dump($db->exec('CREATE TABLE test_sqlite_filename_uri (id INT);')); // create with readonly mode $filename = "file:" . __DIR__ . DIRECTORY_SEPARATOR . "pdo_sqlite_filename_uri.db?mode=ro"; $db = new PDO('sqlite:' . $filename); -var_dump($db->exec('CREATE TABLE test2 (id INT);')); +var_dump($db->exec('CREATE TABLE test_sqlite_filename_uri_2 (id INT);')); ?> --CLEAN-- diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_open_basedir.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_open_basedir.phpt index 425d2190234b..906a41c0e580 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_open_basedir.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_open_basedir.phpt @@ -12,7 +12,7 @@ $filename = 'pdo_sqlite_filename.db'; $db = new PDO('sqlite:' . $filename); -var_dump($db->exec('CREATE TABLE test1 (id INT);')); +var_dump($db->exec('CREATE TABLE test_sqlite_open_basedir (id INT);')); // create outside basedir $filename = '..' . DIRECTORY_SEPARATOR . 'pdo_sqlite_filename.db'; diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt index abec53796b62..772b1d9a76b0 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt @@ -10,11 +10,11 @@ $filename = __DIR__ . DIRECTORY_SEPARATOR . "pdo_sqlite_open_flags.db"; // Default open flag is read-write|create $db = new PDO('sqlite:' . $filename, null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]); -var_dump($db->exec('CREATE TABLE test1 (id INT);')); +var_dump($db->exec('CREATE TABLE test_sqlite_open_flags (id INT);')); $db = new PDO('sqlite:' . $filename, null, null, [PDO::SQLITE_ATTR_OPEN_FLAGS => PDO::SQLITE_OPEN_READONLY, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]); -var_dump($db->exec('CREATE TABLE test2 (id INT);')); +var_dump($db->exec('CREATE TABLE test_sqlite_open_flags_2 (id INT);')); ?> --CLEAN-- prepare('SELECT 1;'); var_dump($st->getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT)); -$st = $db->prepare('CREATE TABLE test (a TEXT);'); +$st = $db->prepare('CREATE TABLE test_sqlite_stmt_getattribute (a TEXT);'); var_dump($st->getAttribute(PDO::SQLITE_ATTR_READONLY_STATEMENT)); ?> From 4cbc66d5e646a473e0dd2ac7bf98839894c5fb43 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Tue, 8 Aug 2023 12:42:16 +0100 Subject: [PATCH 102/120] Fix skipif condition on new test I'm an idiot, messed up the condition when tweaking the test manually before committing. --- ext/standard/tests/file/tempnam_variation9.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/tests/file/tempnam_variation9.phpt b/ext/standard/tests/file/tempnam_variation9.phpt index bea936462294..22f3ea109bf2 100644 --- a/ext/standard/tests/file/tempnam_variation9.phpt +++ b/ext/standard/tests/file/tempnam_variation9.phpt @@ -2,7 +2,7 @@ Test tempnam() function: usage variations - test prefix maximum size --SKIPIF-- From 038b2ae254b6c495498bd8cf4c57f4e320a4f91b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 8 Aug 2023 15:31:58 +0200 Subject: [PATCH 103/120] Make the $enable parameter of odbc_autocommit() nullable (#11909) Co-authored-by: George Peter Banyard --- UPGRADING | 5 +++++ ext/odbc/odbc.stub.php | 2 +- ext/odbc/odbc_arginfo.h | 4 ++-- ext/odbc/php_odbc.c | 9 +++++---- ext/odbc/tests/odbc_autocommit_001.phpt | 25 +++++++++++++++++++++++++ 5 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 ext/odbc/tests/odbc_autocommit_001.phpt diff --git a/UPGRADING b/UPGRADING index f18c7118e921..963035200182 100644 --- a/UPGRADING +++ b/UPGRADING @@ -278,6 +278,11 @@ PHP 8.3 UPGRADE NOTES . mysqli_poll now raises a ValueError when the read nor error arguments are passed. +- ODBC + . odbc_autocommit() now accepts null for the $enable parameter. + Passing null has the same behaviour as passing only 1 parameter, + namely indicating if the autocommit feature is enabled or not. + - PGSQL: . pg_fetch_object now raises a ValueError instead of an Exception when the constructor_args argument is non empty with the class not having diff --git a/ext/odbc/odbc.stub.php b/ext/odbc/odbc.stub.php index 444978837eed..9606a38633f3 100644 --- a/ext/odbc/odbc.stub.php +++ b/ext/odbc/odbc.stub.php @@ -425,7 +425,7 @@ function odbc_field_scale($statement, int $field): int|false {} function odbc_field_num($statement, string $field): int|false {} /** @param resource $odbc */ -function odbc_autocommit($odbc, bool $enable = false): int|bool {} +function odbc_autocommit($odbc, ?bool $enable = null): int|bool {} /** @param resource $odbc */ function odbc_commit($odbc): bool {} diff --git a/ext/odbc/odbc_arginfo.h b/ext/odbc/odbc_arginfo.h index a29e33cc65c3..574d829daad4 100644 --- a/ext/odbc/odbc_arginfo.h +++ b/ext/odbc/odbc_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c7d91d30503ac09c8610ce86846c36123b87f62a */ + * Stub hash: 0417b68a519527b0ee916bad75116ffe4a3ad304 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_close_all, 0, 0, IS_VOID, 0) ZEND_END_ARG_INFO() @@ -126,7 +126,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_odbc_autocommit, 0, 1, MAY_BE_LONG|MAY_BE_BOOL) ZEND_ARG_INFO(0, odbc) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 0, "false") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_odbc_commit, 0, 1, _IS_BOOL, 0) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index a26a1a43c692..804e79b06363 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2553,8 +2553,9 @@ PHP_FUNCTION(odbc_autocommit) RETCODE rc; zval *pv_conn; bool pv_onoff = 0; + bool pv_onoff_is_null = true; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|b", &pv_conn, &pv_onoff) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "r|b!", &pv_conn, &pv_onoff, &pv_onoff_is_null) == FAILURE) { RETURN_THROWS(); } @@ -2562,13 +2563,13 @@ PHP_FUNCTION(odbc_autocommit) RETURN_THROWS(); } - if (ZEND_NUM_ARGS() > 1) { + if (!pv_onoff_is_null) { rc = SQLSetConnectOption(conn->hdbc, SQL_AUTOCOMMIT, pv_onoff ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF); if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { odbc_sql_error(conn, SQL_NULL_HSTMT, "Set autocommit"); RETURN_FALSE; } - RETVAL_TRUE; + RETURN_TRUE; } else { SQLINTEGER status; @@ -2577,7 +2578,7 @@ PHP_FUNCTION(odbc_autocommit) odbc_sql_error(conn, SQL_NULL_HSTMT, "Get commit status"); RETURN_FALSE; } - RETVAL_LONG((zend_long)status); + RETURN_LONG((zend_long)status); } } /* }}} */ diff --git a/ext/odbc/tests/odbc_autocommit_001.phpt b/ext/odbc/tests/odbc_autocommit_001.phpt new file mode 100644 index 000000000000..6ae09736555c --- /dev/null +++ b/ext/odbc/tests/odbc_autocommit_001.phpt @@ -0,0 +1,25 @@ +--TEST-- +odbc_autocommit(): Basic test +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +bool(true) +int(1) +bool(true) +int(0) From d19e4da125365080b52c4e6e4a1b2e105c14add5 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 7 Aug 2023 21:16:33 +0200 Subject: [PATCH 104/120] Fix segfault when DOMParentNode::prepend() is called when the child disappears Closes GH-11906. --- NEWS | 2 ++ ext/dom/parentnode.c | 63 ++++++++++++++++++-------------------- ext/dom/tests/gh11906.phpt | 45 +++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 33 deletions(-) create mode 100644 ext/dom/tests/gh11906.phpt diff --git a/NEWS b/NEWS index 8007ebceaeac..071cf71a8218 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,8 @@ PHP NEWS . Fix manually calling __construct() on DOM classes. (nielsdos) . Fixed bug GH-11830 (ParentNode methods should perform their checks upfront). (nielsdos) + . Fix segfault when DOMParentNode::prepend() is called when the child + disappears. (nielsdos) - FFI: . Fix leaking definitions when using FFI::cdef()->new(...). (ilutov) diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index 4f3187db9697..d6b0705545a1 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -280,6 +280,33 @@ static zend_result dom_sanity_check_node_list_for_insertion(php_libxml_ref_obj * return SUCCESS; } +static void dom_pre_insert(xmlNodePtr insertion_point, xmlNodePtr parentNode, xmlNodePtr newchild, xmlNodePtr fragment) +{ + if (!insertion_point) { + /* Place it as last node */ + if (parentNode->children) { + /* There are children */ + newchild->prev = parentNode->last; + parentNode->last->next = newchild; + } else { + /* No children, because they moved out when they became a fragment */ + parentNode->children = newchild; + } + parentNode->last = fragment->last; + } else { + /* Insert fragment before insertion_point */ + fragment->last->next = insertion_point; + if (insertion_point->prev) { + insertion_point->prev->next = newchild; + newchild->prev = insertion_point->prev; + } + insertion_point->prev = fragment->last; + if (parentNode->children == insertion_point) { + parentNode->children = newchild; + } + } +} + void dom_parent_node_append(dom_object *context, zval *nodes, int nodesc) { xmlNode *parentNode = dom_object_get_node(context); @@ -331,21 +358,18 @@ void dom_parent_node_prepend(dom_object *context, zval *nodes, int nodesc) return; } - xmlNodePtr newchild, nextsib; xmlNode *fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); if (fragment == NULL) { return; } - newchild = fragment->children; - nextsib = parentNode->children; + xmlNode *newchild = fragment->children; if (newchild) { xmlNodePtr last = fragment->last; - parentNode->children = newchild; - fragment->last->next = nextsib; - nextsib->prev = last; + + dom_pre_insert(parentNode->children, parentNode, newchild, fragment); dom_fragment_assign_parent_node(parentNode, fragment); @@ -355,33 +379,6 @@ void dom_parent_node_prepend(dom_object *context, zval *nodes, int nodesc) xmlFree(fragment); } -static void dom_pre_insert(xmlNodePtr insertion_point, xmlNodePtr parentNode, xmlNodePtr newchild, xmlNodePtr fragment) -{ - if (!insertion_point) { - /* Place it as last node */ - if (parentNode->children) { - /* There are children */ - newchild->prev = parentNode->last; - parentNode->last->next = newchild; - } else { - /* No children, because they moved out when they became a fragment */ - parentNode->children = newchild; - } - parentNode->last = fragment->last; - } else { - /* Insert fragment before insertion_point */ - fragment->last->next = insertion_point; - if (insertion_point->prev) { - insertion_point->prev->next = newchild; - newchild->prev = insertion_point->prev; - } - insertion_point->prev = fragment->last; - if (parentNode->children == insertion_point) { - parentNode->children = newchild; - } - } -} - void dom_parent_node_after(dom_object *context, zval *nodes, int nodesc) { /* Spec link: https://dom.spec.whatwg.org/#dom-childnode-after */ diff --git a/ext/dom/tests/gh11906.phpt b/ext/dom/tests/gh11906.phpt new file mode 100644 index 000000000000..4298051e5806 --- /dev/null +++ b/ext/dom/tests/gh11906.phpt @@ -0,0 +1,45 @@ +--TEST-- +GH-11906 (prepend without children after creating fragment results in segfault) +--EXTENSIONS-- +dom +--FILE-- +loadXML(<< + + + +XML); + +$container = $doc->documentElement; +$child = $container->firstElementChild; + +$test = $doc->createElement('foo'); +$test->append($child); +echo "--- document output ---\n"; +echo $doc->saveXML(); +echo "--- \$test output ---\n"; +echo $doc->saveXML($test), "\n"; +$test->prepend($child); +echo "--- document output ---\n"; +echo $doc->saveXML(); +echo "--- \$test output ---\n"; +echo $doc->saveXML($test), "\n"; +$test->append($child); +?> +--EXPECT-- +--- document output --- + + + + +--- $test output --- + +--- document output --- + + + + +--- $test output --- + From db4dba6702781273bc24812d517414b9dd8954c5 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 9 Aug 2023 11:38:54 +0200 Subject: [PATCH 105/120] Move opnum_start for goto for clarification (#11911) opnum_start denotes the start of the ZEND_FREE block of skipped consuming opcodes. Storing the number before zend_compile_expr(..., label_ast) makes it seem like it denotes the start of the label block. However, label_ast must only be a zval string AST, and as such never results in an actual opcode. --- Zend/zend_compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 1595f51fb13a..5dff47798b01 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -5334,11 +5334,11 @@ static void zend_compile_goto(zend_ast *ast) /* {{{ */ zend_ast *label_ast = ast->child[0]; znode label_node; zend_op *opline; - uint32_t opnum_start = get_next_op_number(); zend_compile_expr(&label_node, label_ast); /* Label resolution and unwinding adjustments happen in pass two. */ + uint32_t opnum_start = get_next_op_number(); zend_handle_loops_and_finally(NULL); opline = zend_emit_op(NULL, ZEND_GOTO, NULL, &label_node); opline->op1.num = get_next_op_number() - opnum_start - 1; From fc9266a5fc6cbae6c2157300c8cf1d9185d491dd Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 7 Aug 2023 12:44:53 +0200 Subject: [PATCH 106/120] Move ASAN built to GitHub actions Cirrus will no longer offer unlimited free builds starting next month. We don't have an alternative for FreeBSD and ARM, so move what we can for now. Closes GH-11898 --- .cirrus.yml | 180 ------------------ .github/actions/apt-x64/action.yml | 1 + .github/actions/configure-x64/action.yml | 37 ++-- .github/actions/install-linux/action.yml | 8 +- .github/workflows/push.yml | 22 ++- Zend/tests/bug78010.phpt | 4 + ext/mysqli/tests/mysqli_fetch_all.phpt | 1 + .../tests/mysqli_fetch_array_many_rows.phpt | 1 + .../mysqli_mysqlnd_read_timeout_long.phpt | 1 + ext/mysqli/tests/mysqli_stmt_bind_limits.phpt | 1 + .../tests/mysqli_stmt_send_long_data.phpt | 1 + .../tests/cache_list/frontcontroller1.phpt | 4 + .../tests/cache_list/frontcontroller21.phpt | 4 + .../tests/cache_list/frontcontroller22.phpt | 4 + .../tests/cache_list/frontcontroller23.phpt | 4 + .../tests/cache_list/frontcontroller31.phpt | 4 + .../tests/cache_list/frontcontroller32.phpt | 4 + .../tests/cache_list/frontcontroller33.phpt | 4 + .../tests/cache_list/frontcontroller34.phpt | 4 + ext/standard/tests/file/bug22414.phpt | 4 + ext/zlib/tests/bug67724.phpt | 4 + 21 files changed, 91 insertions(+), 206 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 28c0a8259129..a5910b782136 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,186 +1,6 @@ env: CIRRUS_CLONE_DEPTH: 1 -asan_task: - name: ASAN_DEBUG_NTS - container: - image: gcc:latest - additional_containers: - - name: mysql - image: mysql:8 - port: 3306 - cpu: 1.0 - memory: 1G - env: - MYSQL_ROOT_PASSWORD: "root" - MYSQL_DATABASE: "test" - install_script: - - apt-get update -y - - >- - apt-get install -y - bison - re2c - locales - locales-all - `#ldap-utils` - openssl - `slapd` - libgmp-dev - libicu-dev - `#libtidy-dev` - `#libenchant-dev` - libaspell-dev - libpspell-dev - libsasl2-dev - libxpm-dev - libzip-dev - `#libsqlite3-dev` - libwebp-dev - libonig-dev - libkrb5-dev - libgssapi-krb5-2 - libcurl4-openssl-dev - libxml2-dev - libxslt1-dev - libpq-dev - libreadline-dev - `#libldap2-dev` - libsodium-dev - libargon2-0-dev - libmm-dev - `#libsnmp-dev` - `#postgresql` - `#postgresql-contrib` - `#snmpd` - `#snmp-mibs-downloader` - `#freetds-dev` - `#unixodbc-dev` - llvm - clang - libc-client-dev - dovecot-core - dovecot-pop3d - dovecot-imapd - `#sendmail` - `#firebird-dev` - liblmdb-dev - libtokyocabinet-dev - libdb-dev - libqdbm-dev - libjpeg-dev - libpng-dev - libfreetype6-dev - build_script: - - ./buildconf -f - - >- - ./configure - --enable-debug - --enable-zts - --enable-option-checking=fatal - --prefix=/usr - --enable-phpdbg - --enable-fpm - --enable-opcache - --disable-opcache-jit - --with-pdo-mysql=mysqlnd - --with-mysqli=mysqlnd - `#--with-pgsql` - `#--with-pdo-pgsql` - `#--with-pdo-sqlite` - --enable-intl - --without-pear - --enable-gd - --with-jpeg - --with-webp - --with-freetype - --with-xpm - --enable-exif - --with-zip - --with-zlib - --with-zlib-dir=/usr - --enable-soap - --enable-xmlreader - --with-xsl - `#--with-tidy` - --enable-sysvsem - --enable-sysvshm - --enable-shmop - --enable-pcntl - --with-readline - --enable-mbstring - --with-curl - --with-gettext - --enable-sockets - --with-bz2 - --with-openssl - --with-gmp - --enable-bcmath - --enable-calendar - --enable-ftp - --with-pspell=/usr - `#--with-enchant=/usr` - --with-kerberos - --enable-sysvmsg - --with-ffi - --enable-zend-test - `#--enable-dl-test=shared` - `#--with-ldap` - `#--with-ldap-sasl` - --with-password-argon2 - --with-mhash - --with-sodium - --enable-dba - --with-cdb - --enable-flatfile - --enable-inifile - --with-tcadb - --with-lmdb - --with-qdbm - `#--with-snmp` - `#--with-unixODBC` - `#--with-imap` - --with-kerberos - --with-imap-ssl - `#--with-pdo-odbc=unixODBC,/usr` - `#--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient` - `#--with-oci8=shared,instantclient,/opt/oracle/instantclient` - --with-config-file-path=/etc - --with-config-file-scan-dir=/etc/php.d - `#--with-pdo-firebird` - `#--with-pdo-dblib` - --enable-werror - CFLAGS='-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address' - CC=clang - CXX=clang++ - - make -j2 - - make install - - mkdir -p /etc/php.d - - echo opcache.enable_cli=1 > /etc/php.d/opcache.ini - - echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini - # Specify opcache.preload_user as we're running as root. - - echo opcache.preload_user=root >> /etc/php.d/opcache.ini - tests_script: - - export SKIP_IO_CAPTURE_TESTS=1 - - export CI_NO_IPV6=1 - - export MYSQL_TEST_HOST=127.0.0.1 - - export MYSQL_TEST_USER=root - - export MYSQL_TEST_PASSWD=root - - export PDO_MYSQL_TEST_DSN="mysql:host=127.0.0.1;dbname=test" - - export PDO_MYSQL_TEST_USER=root - - export PDO_MYSQL_TEST_PASS=root - - >- - sapi/cli/php run-tests.php - -P -q -x -j2 - -g FAIL,BORK,LEAK,XLEAK - --no-progress - --offline - --show-diff - --show-slow 1000 - --set-timeout 120 - -d zend_extension=opcache.so - -d opcache.enable_cli=1 - --asan - freebsd_task: name: FREEBSD_DEBUG_NTS freebsd_instance: diff --git a/.github/actions/apt-x64/action.yml b/.github/actions/apt-x64/action.yml index 621b18532e05..704388fee8c7 100644 --- a/.github/actions/apt-x64/action.yml +++ b/.github/actions/apt-x64/action.yml @@ -46,6 +46,7 @@ runs: freetds-dev \ unixodbc-dev \ llvm \ + clang \ libc-client-dev \ dovecot-core \ dovecot-pop3d \ diff --git a/.github/actions/configure-x64/action.yml b/.github/actions/configure-x64/action.yml index ee802334490a..6011a87e4878 100644 --- a/.github/actions/configure-x64/action.yml +++ b/.github/actions/configure-x64/action.yml @@ -3,6 +3,9 @@ inputs: configurationParameters: default: '' required: false + skipSlow: + default: false + required: false runs: using: composite steps: @@ -17,9 +20,9 @@ runs: --enable-fpm \ --with-pdo-mysql=mysqlnd \ --with-mysqli=mysqlnd \ - --with-pgsql \ - --with-pdo-pgsql \ - --with-pdo-sqlite \ + ${{ inputs.skipSlow == 'false' && '--with-pgsql' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-pdo-pgsql' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-pdo-sqlite' || '' }} \ --enable-intl \ --without-pear \ --enable-gd \ @@ -34,7 +37,7 @@ runs: --enable-soap \ --enable-xmlreader \ --with-xsl \ - --with-tidy \ + ${{ inputs.skipSlow == 'false' && '--with-tidy' || '' }} \ --enable-sysvsem \ --enable-sysvshm \ --enable-shmop \ @@ -51,14 +54,14 @@ runs: --enable-calendar \ --enable-ftp \ --with-pspell=/usr \ - --with-enchant=/usr \ + ${{ inputs.skipSlow == 'false' && '--with-enchant=/usr' || '' }} \ --with-kerberos \ --enable-sysvmsg \ --with-ffi \ --enable-zend-test \ - --enable-dl-test=shared \ - --with-ldap \ - --with-ldap-sasl \ + ${{ inputs.skipSlow == 'false' && '--enable-dl-test=shared' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-ldap' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-ldap-sasl' || '' }} \ --with-password-argon2 \ --with-mhash \ --with-sodium \ @@ -69,16 +72,16 @@ runs: --with-tcadb \ --with-lmdb \ --with-qdbm \ - --with-snmp \ - --with-unixODBC \ - --with-imap \ - --with-imap-ssl \ - --with-pdo-odbc=unixODBC,/usr \ - --with-pdo-oci=shared,instantclient,/opt/oracle/instantclient \ - --with-oci8=shared,instantclient,/opt/oracle/instantclient \ + ${{ inputs.skipSlow == 'false' && '--with-snmp' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-unixODBC' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-imap' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-imap-ssl' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-pdo-odbc=unixODBC,/usr' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-pdo-oci=shared,instantclient,/opt/oracle/instantclient' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-oci8=shared,instantclient,/opt/oracle/instantclient' || '' }} \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d \ - --with-pdo-firebird \ - --with-pdo-dblib \ + ${{ inputs.skipSlow == 'false' && '--with-pdo-firebird' || '' }} \ + ${{ inputs.skipSlow == 'false' && '--with-pdo-dblib' || '' }} \ --enable-werror \ ${{ inputs.configurationParameters }} diff --git a/.github/actions/install-linux/action.yml b/.github/actions/install-linux/action.yml index 7ac2ae4c4fcb..d2f7ea23b2ef 100644 --- a/.github/actions/install-linux/action.yml +++ b/.github/actions/install-linux/action.yml @@ -1,4 +1,8 @@ name: Install +inputs: + withOci: + default: true + required: false runs: using: composite steps: @@ -10,5 +14,5 @@ runs: sudo chmod 777 /etc/php.d echo mysqli.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/mysqli.ini echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini - echo extension=oci8.so > /etc/php.d/oci8.ini - echo extension=pdo_oci.so > /etc/php.d/pdo_oci.ini + ${{ inputs.withOci == 'true' && 'echo extension=oci8.so > /etc/php.d/oci8.ini' || '' }} + ${{ inputs.withOci == 'true' && 'echo extension=pdo_oci.so > /etc/php.d/pdo_oci.ini' || '' }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 99430f97e62c..a8edf9c1126a 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -47,11 +47,13 @@ jobs: fail-fast: false matrix: include: - - debug: true - zts: false - debug: false + zts: false + asan: false + - debug: true zts: true - name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" + asan: true + name: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}" runs-on: ubuntu-22.04 steps: - name: git checkout @@ -70,7 +72,7 @@ jobs: # This duplicates the "job.name" expression above because # GitHub has no way to query the job name (github.job is the # job id, not the job name) - key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}-${{hashFiles('main/php_version.h')}}" + key: "LINUX_X64_${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}-${{hashFiles('main/php_version.h')}}" append-timestamp: false - name: ./configure uses: ./.github/actions/configure-x64 @@ -78,24 +80,30 @@ jobs: configurationParameters: >- --${{ matrix.debug && 'enable' || 'disable' }}-debug --${{ matrix.zts && 'enable' || 'disable' }}-zts + ${{ matrix.asan && 'CFLAGS="-fsanitize=undefined,address -DZEND_TRACK_ARENA_ALLOC" LDFLAGS="-fsanitize=undefined,address" CC=clang CXX=clang++ --disable-opcache-jit' || '' }} + skipSlow: ${{ matrix.asan }} - name: make run: make -j$(/usr/bin/nproc) >/dev/null - name: make install uses: ./.github/actions/install-linux + with: + withOci: ${{ !matrix.asan }} - name: Setup uses: ./.github/actions/setup-x64 - name: Test + if: matrix.asan == false uses: ./.github/actions/test-linux with: testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} - - name: Test Tracing JIT + - name: Test ${{ matrix.asan && 'OpCache' || 'Tracing JIT' }} uses: ./.github/actions/test-linux with: - testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }} Tracing JIT + testArtifacts: ${{ matrix.debug && 'DEBUG' || 'RELEASE' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}${{ matrix.asan && '_ASAN' || '' }}_${{ matrix.asan && 'OpCache' || 'Tracing JIT' }} runTestsParameters: >- -d zend_extension=opcache.so -d opcache.enable_cli=1 - -d opcache.jit_buffer_size=16M + ${{ !matrix.asan && '-d opcache.jit_buffer_size=16M' || '' }} + ${{ matrix.asan && '--asan -x' || '' }} - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files LINUX_X32: diff --git a/Zend/tests/bug78010.phpt b/Zend/tests/bug78010.phpt index 82334e78a25c..6b266b77b667 100644 --- a/Zend/tests/bug78010.phpt +++ b/Zend/tests/bug78010.phpt @@ -1,5 +1,9 @@ --TEST-- Bug #78010: Segmentation fault during GC +--SKIPIF-- + --INI-- memory_limit=2G --FILE-- diff --git a/ext/mysqli/tests/mysqli_fetch_all.phpt b/ext/mysqli/tests/mysqli_fetch_all.phpt index 0ab9585e1c10..75d26f617b45 100644 --- a/ext/mysqli/tests/mysqli_fetch_all.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all.phpt @@ -4,6 +4,7 @@ mysqli_fetch_all() mysqli --SKIPIF-- --FILE-- diff --git a/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt b/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt index ebdf30d439be..4650475e7333 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt @@ -4,6 +4,7 @@ mysqli_fetch_array() mysqli --SKIPIF-- --FILE-- diff --git a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt index 0af0cb7a0ce7..f568941b57f6 100644 --- a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt +++ b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt @@ -4,6 +4,7 @@ mysqlnd.net_read_timeout > default_socket_timeout mysqli --SKIPIF-- --CONFLICTS-- diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt index da6572d5b8fe..cc4a92727091 100644 --- a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt +++ b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt @@ -4,6 +4,7 @@ mysqli_stmt_send_long_data() mysqli --SKIPIF-- --FILE-- diff --git a/ext/phar/tests/cache_list/frontcontroller1.phpt b/ext/phar/tests/cache_list/frontcontroller1.phpt index e912362205d5..fc8ec38f127b 100644 --- a/ext/phar/tests/cache_list/frontcontroller1.phpt +++ b/ext/phar/tests/cache_list/frontcontroller1.phpt @@ -4,6 +4,10 @@ Phar front controller other phar.cache_list={PWD}/frontcontroller1.php [cache_list] --EXTENSIONS-- phar +--SKIPIF-- + --ENV-- SCRIPT_NAME=/frontcontroller1.php REQUEST_URI=/frontcontroller1.php/a.jpg diff --git a/ext/phar/tests/cache_list/frontcontroller21.phpt b/ext/phar/tests/cache_list/frontcontroller21.phpt index c86e8a741e6f..5b212747fb75 100644 --- a/ext/phar/tests/cache_list/frontcontroller21.phpt +++ b/ext/phar/tests/cache_list/frontcontroller21.phpt @@ -6,6 +6,10 @@ phar.cache_list={PWD}/frontcontroller21.php cgi.fix_pathinfo=1 --EXTENSIONS-- phar +--SKIPIF-- + --ENV-- SCRIPT_NAME=/frontcontroller21.php REQUEST_URI=/frontcontroller21.php/index.php?test=hi diff --git a/ext/phar/tests/cache_list/frontcontroller22.phpt b/ext/phar/tests/cache_list/frontcontroller22.phpt index 520ecb3c4afa..6747da6dc795 100644 --- a/ext/phar/tests/cache_list/frontcontroller22.phpt +++ b/ext/phar/tests/cache_list/frontcontroller22.phpt @@ -5,6 +5,10 @@ default_charset=UTF-8 phar.cache_list={PWD}/frontcontroller22.phpt --EXTENSIONS-- phar +--SKIPIF-- + --ENV-- SCRIPT_NAME=/frontcontroller22.php REQUEST_URI=/frontcontroller22.php/index.php diff --git a/ext/phar/tests/cache_list/frontcontroller23.phpt b/ext/phar/tests/cache_list/frontcontroller23.phpt index 5a6ce18f403c..85f78a49800d 100644 --- a/ext/phar/tests/cache_list/frontcontroller23.phpt +++ b/ext/phar/tests/cache_list/frontcontroller23.phpt @@ -5,6 +5,10 @@ default_charset=UTF-8 phar.cache_list={PWD}/frontcontroller23.php --EXTENSIONS-- phar +--SKIPIF-- + --ENV-- SCRIPT_NAME=/frontcontroller23.php REQUEST_URI=/frontcontroller23.php/hi/there diff --git a/ext/phar/tests/cache_list/frontcontroller31.phpt b/ext/phar/tests/cache_list/frontcontroller31.phpt index 106ad17db756..9feed05344ee 100644 --- a/ext/phar/tests/cache_list/frontcontroller31.phpt +++ b/ext/phar/tests/cache_list/frontcontroller31.phpt @@ -5,6 +5,10 @@ default_charset=UTF-8 phar.cache_list={PWD}/frontcontroller31.php --EXTENSIONS-- phar +--SKIPIF-- + --ENV-- SCRIPT_NAME=/frontcontroller31.php REQUEST_URI=/frontcontroller31.php diff --git a/ext/phar/tests/cache_list/frontcontroller32.phpt b/ext/phar/tests/cache_list/frontcontroller32.phpt index 6db3573041df..a61c91e1be29 100644 --- a/ext/phar/tests/cache_list/frontcontroller32.phpt +++ b/ext/phar/tests/cache_list/frontcontroller32.phpt @@ -5,6 +5,10 @@ default_charset=UTF-8 phar.cache_list={PWD}/frontcontroller32.php --EXTENSIONS-- phar +--SKIPIF-- + --ENV-- SCRIPT_NAME=/frontcontroller32.php REQUEST_URI=/frontcontroller32.php diff --git a/ext/phar/tests/cache_list/frontcontroller33.phpt b/ext/phar/tests/cache_list/frontcontroller33.phpt index 1036fc2c46a8..1b0684bc2fc4 100644 --- a/ext/phar/tests/cache_list/frontcontroller33.phpt +++ b/ext/phar/tests/cache_list/frontcontroller33.phpt @@ -5,6 +5,10 @@ default_charset=UTF-8 phar.cache_list={PWD}/frontcontroller33.php --EXTENSIONS-- phar +--SKIPIF-- + --ENV-- SCRIPT_NAME=/frontcontroller33.php REQUEST_URI=/frontcontroller33.php diff --git a/ext/phar/tests/cache_list/frontcontroller34.phpt b/ext/phar/tests/cache_list/frontcontroller34.phpt index b4916f176186..d3c02214b2e5 100644 --- a/ext/phar/tests/cache_list/frontcontroller34.phpt +++ b/ext/phar/tests/cache_list/frontcontroller34.phpt @@ -5,6 +5,10 @@ default_charset=UTF-8 phar.cache_list={PWD}/frontcontroller34.php --EXTENSIONS-- phar +--SKIPIF-- + --ENV-- SCRIPT_NAME=/frontcontroller34.php REQUEST_URI=/frontcontroller34.php/start/index.php diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt index 49ac237f1ab6..c0369eef17ee 100644 --- a/ext/standard/tests/file/bug22414.phpt +++ b/ext/standard/tests/file/bug22414.phpt @@ -1,5 +1,9 @@ --TEST-- Bug #22414 (passthru() does not read data correctly) +--SKIPIF-- + --INI-- output_handler= --FILE-- diff --git a/ext/zlib/tests/bug67724.phpt b/ext/zlib/tests/bug67724.phpt index 23e27ec6995e..7367cb615d8a 100644 --- a/ext/zlib/tests/bug67724.phpt +++ b/ext/zlib/tests/bug67724.phpt @@ -2,6 +2,10 @@ Bug #67724 (chained zlib filters silently fail with large amounts of data) --EXTENSIONS-- zlib +--SKIPIF-- + --FILE-- Date: Wed, 9 Aug 2023 10:19:10 +0100 Subject: [PATCH 107/120] Fix GH-11416: Crash with DatePeriod when uninitialised objects are passed in --- NEWS | 4 ++++ ext/date/php_date.c | 6 ++++++ ext/date/tests/bug-gh11416.phpt | 28 ++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 ext/date/tests/bug-gh11416.phpt diff --git a/NEWS b/NEWS index 071cf71a8218..8057a9cf0a73 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,10 @@ PHP NEWS - Core: . Fixed strerror_r detection at configuration time. (Kévin Dunglas) +- Date: + . Fixed bug GH-11416: Crash with DatePeriod when uninitialised objects + are passed in. (Derick) + - DOM: . Fix DOMEntity field getter bugs. (nielsdos) . Fix incorrect attribute existence check in DOMElement::setAttributeNodeNS. diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 7b0f223f92fb..fe58eba5c899 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -4338,6 +4338,12 @@ PHP_METHOD(DatePeriod, __construct) } dpobj->start_ce = date_ce_date; } else { + /* check initialisation */ + DATE_CHECK_INITIALIZED(Z_PHPDATE_P(start)->time, DateTimeInterface); + if (end) { + DATE_CHECK_INITIALIZED(Z_PHPDATE_P(end)->time, DateTimeInterface); + } + /* init */ php_interval_obj *intobj = Z_PHPINTERVAL_P(interval); diff --git a/ext/date/tests/bug-gh11416.phpt b/ext/date/tests/bug-gh11416.phpt new file mode 100644 index 000000000000..f3746fa6ca6d --- /dev/null +++ b/ext/date/tests/bug-gh11416.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug GH-11416: Crash with DatePeriod when uninitialised objects are passed in +--INI-- +date.timezone=UTC +--FILE-- +newInstanceWithoutConstructor(); +try { + new DatePeriod($date, new DateInterval('P1D'), 2); +} catch (Error $e) { + echo get_class($e), ': ', $e->getMessage(), "\n"; +} + +$date = (new ReflectionClass(DateTime::class))->newInstanceWithoutConstructor(); +try { + new DatePeriod($now, new DateInterval('P1D'), $date); +} catch (Error $e) { + echo get_class($e), ': ', $e->getMessage(), "\n"; +} + +echo "OK\n"; +?> +--EXPECT-- +Error: The DateTimeInterface object has not been correctly initialized by its constructor +Error: The DateTimeInterface object has not been correctly initialized by its constructor +OK From b71d2e16e640e1cad33db2ae595d911dd6ffbf5f Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 9 Aug 2023 16:06:46 +0100 Subject: [PATCH 108/120] Fix GH-11416: Crash with DatePeriod when uninitialised objects are passed in (PHP 8.2+) --- NEWS | 4 ++++ ext/date/php_date.c | 20 ++++++++++++++++ ext/date/tests/bug-gh11416.phpt | 42 +++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/NEWS b/NEWS index d7f8fd5bf2c5..80a72d58cb5c 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,10 @@ PHP NEWS . Fixed bug GH-10964 (Improve man page about the built-in server). (Alexandre Daubois) +- Date: + . Fixed bug GH-11416 (Crash with DatePeriod when uninitialised objects are + passed in). (Derick) + - Core: . Fixed strerror_r detection at configuration time. (Kévin Dunglas) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index b3a58b09b958..4e1ff217b5c1 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -5312,6 +5312,11 @@ static bool php_date_period_initialize_from_hash(php_period_obj *period_obj, Has if (Z_TYPE_P(ht_entry) == IS_OBJECT && instanceof_function(Z_OBJCE_P(ht_entry), date_ce_interface)) { php_date_obj *date_obj; date_obj = Z_PHPDATE_P(ht_entry); + + if (!date_obj->time) { + return 0; + } + if (period_obj->start != NULL) { timelib_time_dtor(period_obj->start); } @@ -5329,6 +5334,11 @@ static bool php_date_period_initialize_from_hash(php_period_obj *period_obj, Has if (Z_TYPE_P(ht_entry) == IS_OBJECT && instanceof_function(Z_OBJCE_P(ht_entry), date_ce_interface)) { php_date_obj *date_obj; date_obj = Z_PHPDATE_P(ht_entry); + + if (!date_obj->time) { + return 0; + } + if (period_obj->end != NULL) { timelib_time_dtor(period_obj->end); } @@ -5345,6 +5355,11 @@ static bool php_date_period_initialize_from_hash(php_period_obj *period_obj, Has if (Z_TYPE_P(ht_entry) == IS_OBJECT && instanceof_function(Z_OBJCE_P(ht_entry), date_ce_interface)) { php_date_obj *date_obj; date_obj = Z_PHPDATE_P(ht_entry); + + if (!date_obj->time) { + return 0; + } + if (period_obj->current != NULL) { timelib_time_dtor(period_obj->current); } @@ -5361,6 +5376,11 @@ static bool php_date_period_initialize_from_hash(php_period_obj *period_obj, Has if (Z_TYPE_P(ht_entry) == IS_OBJECT && Z_OBJCE_P(ht_entry) == date_ce_interval) { php_interval_obj *interval_obj; interval_obj = Z_PHPINTERVAL_P(ht_entry); + + if (!interval_obj->initialized) { + return 0; + } + if (period_obj->interval != NULL) { timelib_rel_time_dtor(period_obj->interval); } diff --git a/ext/date/tests/bug-gh11416.phpt b/ext/date/tests/bug-gh11416.phpt index f3746fa6ca6d..aa86116f90ef 100644 --- a/ext/date/tests/bug-gh11416.phpt +++ b/ext/date/tests/bug-gh11416.phpt @@ -5,6 +5,7 @@ date.timezone=UTC --FILE-- newInstanceWithoutConstructor(); try { @@ -20,9 +21,50 @@ try { echo get_class($e), ': ', $e->getMessage(), "\n"; } +$date = (new ReflectionClass(DateTime::class))->newInstanceWithoutConstructor(); +$dateperiod = (new ReflectionClass(DatePeriod::class))->newInstanceWithoutConstructor(); +$dateinterval = (new ReflectionClass(DateInterval::class))->newInstanceWithoutConstructor(); +try { + $dateperiod->__unserialize(['start' => $date]); +} catch (Error $e) { + echo get_class($e), ': ', $e->getMessage(), "\n"; +} + +try { + $dateperiod->__unserialize(['start' => $now, 'end' => $date]); +} catch (Error $e) { + echo get_class($e), ': ', $e->getMessage(), "\n"; +} + +try { + $dateperiod->__unserialize(['start' => $now, 'end' => $now, 'current' => $date]); +} catch (Error $e) { + echo get_class($e), ': ', $e->getMessage(), "\n"; +} + +try { + $dateperiod->__unserialize(['start' => $now, 'end' => $now, 'current' => $now, 'interval' => $dateinterval]); +} catch (Error $e) { + echo get_class($e), ': ', $e->getMessage(), "\n"; +} + +try { + $dateperiod->__unserialize([ + 'start' => $now, 'end' => $now, 'current' => $now, 'interval' => $simpleInterval, + 'recurrences' => 2, 'include_start_date' => true, 'include_end_date' => true, + ]); + echo "DatePeriod::__unserialize: SUCCESS\n"; +} catch (Error $e) { + echo get_class($e), ': ', $e->getMessage(), "\n"; +} echo "OK\n"; ?> --EXPECT-- Error: The DateTimeInterface object has not been correctly initialized by its constructor Error: The DateTimeInterface object has not been correctly initialized by its constructor +Error: Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object +Error: Invalid serialization data for DatePeriod object +DatePeriod::__unserialize: SUCCESS OK From e157da11f3b57b93878f2fefafb14c54d8f05b21 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Wed, 9 Aug 2023 20:12:41 +0100 Subject: [PATCH 109/120] Update initialisation check for new PHP-8.3 API --- ext/date/php_date.c | 4 ++-- ext/date/tests/bug-gh11416.phpt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 8e16dc83e8b5..5f7d6166f272 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -4957,9 +4957,9 @@ PHP_METHOD(DatePeriod, __construct) } } else { /* check initialisation */ - DATE_CHECK_INITIALIZED(Z_PHPDATE_P(start)->time, DateTimeInterface); + DATE_CHECK_INITIALIZED(Z_PHPDATE_P(start)->time, date_ce_interface); if (end) { - DATE_CHECK_INITIALIZED(Z_PHPDATE_P(end)->time, DateTimeInterface); + DATE_CHECK_INITIALIZED(Z_PHPDATE_P(end)->time, date_ce_interface); } /* init */ diff --git a/ext/date/tests/bug-gh11416.phpt b/ext/date/tests/bug-gh11416.phpt index f3746fa6ca6d..086e16ae7f30 100644 --- a/ext/date/tests/bug-gh11416.phpt +++ b/ext/date/tests/bug-gh11416.phpt @@ -23,6 +23,6 @@ try { echo "OK\n"; ?> --EXPECT-- -Error: The DateTimeInterface object has not been correctly initialized by its constructor -Error: The DateTimeInterface object has not been correctly initialized by its constructor +DateObjectError: Object of type DateTimeInterface has not been correctly initialized by calling parent::__construct() in its constructor +DateObjectError: Object of type DateTimeInterface has not been correctly initialized by calling parent::__construct() in its constructor OK From 23ba4cde53d1ae21099dbe5eadc43687681db497 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 7 Aug 2023 20:46:39 +0200 Subject: [PATCH 110/120] Align DOMChildNode parent checks with spec Closes GH-11905. --- NEWS | 1 + UPGRADING | 8 ++++ ext/dom/parentnode.c | 45 +++++++------------ .../DOMChildNode_methods_without_parent.phpt | 44 ++++++++++++++++++ ext/dom/tests/bug79968.phpt | 15 ++++--- ...hild_and_parent_node_without_document.phpt | 21 +++++++++ 6 files changed, 98 insertions(+), 36 deletions(-) create mode 100644 ext/dom/tests/DOMChildNode_methods_without_parent.phpt create mode 100644 ext/dom/tests/element_child_and_parent_node_without_document.phpt diff --git a/NEWS b/NEWS index d9b735d98300..c5f24c90b174 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ PHP NEWS - DOM: . adoptNode now respects the strict error checking property. (nielsdos) + . Align DOMChildNode parent checks with spec. (nielsdos) - Opcache: . Avoid resetting JIT counter handlers from multiple processes/threads. diff --git a/UPGRADING b/UPGRADING index 963035200182..1aa82831d524 100644 --- a/UPGRADING +++ b/UPGRADING @@ -46,6 +46,14 @@ PHP 8.3 UPGRADE NOTES iterating over the WeakMap (reachability via iteration is considered weak). Previously, such entries would never be automatically removed. +- DOM: + . DOMChildNode::after(), DOMChildNode::before(), DOMChildNode::replaceWith() + on a node that has no parent is now a no-op instead of a hierarchy exception, + which is the behaviour spec demands. + . Using the DOMParentNode and DOMChildNode methods without a document now works + instead of throwing a HIERARCHY_REQUEST_ERR DOMException. This is in line with + the behaviour spec demands. + - FFI: . C functions that have a return type of void now return null instead of returning the following object object(FFI\CData:void) { } diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index b6ed24665c34..fe928797a1d5 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -240,8 +240,8 @@ static void dom_fragment_assign_parent_node(xmlNodePtr parentNode, xmlNodePtr fr static zend_result dom_sanity_check_node_list_for_insertion(php_libxml_ref_obj *document, xmlNodePtr parentNode, zval *nodes, int nodesc) { - if (document == NULL) { - php_dom_throw_error(HIERARCHY_REQUEST_ERR, 1); + if (UNEXPECTED(parentNode == NULL)) { + /* No error required, this must be a no-op per spec */ return FAILURE; } @@ -391,10 +391,9 @@ void dom_parent_node_after(dom_object *context, zval *nodes, uint32_t nodesc) /* Spec step 1 */ parentNode = prevsib->parent; - /* Spec step 2 */ - if (!parentNode) { - int stricterror = dom_get_strict_error(context->document); - php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); + + /* Sanity check for fragment, includes spec step 2 */ + if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { return; } @@ -409,10 +408,6 @@ void dom_parent_node_after(dom_object *context, zval *nodes, uint32_t nodesc) doc = prevsib->doc; - if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { - return; - } - php_libxml_invalidate_node_list_cache_from_doc(doc); /* Spec step 4: convert nodes into fragment */ @@ -448,10 +443,9 @@ void dom_parent_node_before(dom_object *context, zval *nodes, uint32_t nodesc) /* Spec step 1 */ parentNode = nextsib->parent; - /* Spec step 2 */ - if (!parentNode) { - int stricterror = dom_get_strict_error(context->document); - php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); + + /* Sanity check for fragment, includes spec step 2 */ + if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { return; } @@ -466,10 +460,6 @@ void dom_parent_node_before(dom_object *context, zval *nodes, uint32_t nodesc) doc = nextsib->doc; - if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { - return; - } - php_libxml_invalidate_node_list_cache_from_doc(doc); /* Spec step 4: convert nodes into fragment */ @@ -537,7 +527,7 @@ void dom_child_node_remove(dom_object *context) return; } - php_libxml_invalidate_node_list_cache_from_doc(context->document->ptr); + php_libxml_invalidate_node_list_cache_from_doc(child->doc); xmlUnlinkNode(child); } @@ -550,10 +540,9 @@ void dom_child_replace_with(dom_object *context, zval *nodes, uint32_t nodesc) /* Spec step 1 */ xmlNodePtr parentNode = child->parent; - /* Spec step 2 */ - if (!parentNode) { - int stricterror = dom_get_strict_error(context->document); - php_dom_throw_error(HIERARCHY_REQUEST_ERR, stricterror); + + /* Sanity check for fragment, includes spec step 2 */ + if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { return; } @@ -571,11 +560,8 @@ void dom_child_replace_with(dom_object *context, zval *nodes, uint32_t nodesc) viable_next_sibling = viable_next_sibling->next; } - if (UNEXPECTED(dom_sanity_check_node_list_for_insertion(context->document, parentNode, nodes, nodesc) != SUCCESS)) { - return; - } - - php_libxml_invalidate_node_list_cache_from_doc(context->document->ptr); + xmlDocPtr doc = parentNode->doc; + php_libxml_invalidate_node_list_cache_from_doc(doc); /* Spec step 4: convert nodes into fragment */ xmlNodePtr fragment = dom_zvals_to_fragment(context->document, parentNode, nodes, nodesc); @@ -586,7 +572,6 @@ void dom_child_replace_with(dom_object *context, zval *nodes, uint32_t nodesc) /* Spec step 5: perform the replacement */ xmlNodePtr newchild = fragment->children; - xmlDocPtr doc = parentNode->doc; /* Unlink it unless it became a part of the fragment. * Freeing will be taken care of by the lifetime of the returned dom object. */ @@ -621,7 +606,7 @@ void dom_parent_node_replace_children(dom_object *context, zval *nodes, uint32_t return; } - php_libxml_invalidate_node_list_cache_from_doc(context->document->ptr); + php_libxml_invalidate_node_list_cache_from_doc(thisp->doc); dom_remove_all_children(thisp); diff --git a/ext/dom/tests/DOMChildNode_methods_without_parent.phpt b/ext/dom/tests/DOMChildNode_methods_without_parent.phpt new file mode 100644 index 000000000000..2591105cc37f --- /dev/null +++ b/ext/dom/tests/DOMChildNode_methods_without_parent.phpt @@ -0,0 +1,44 @@ +--TEST-- +DOMChildNode methods without a parent +--EXTENSIONS-- +dom +--FILE-- +loadXML(<< + + + +XML); + +$container = $doc->documentElement; +$child = $container->firstElementChild; + +$test = $doc->createElement('foo'); +foreach (['before', 'after', 'replaceWith'] as $method) { + echo "--- $method ---\n"; + $test->$method($child); + echo $doc->saveXML(); + echo $doc->saveXML($test), "\n"; +} +?> +--EXPECT-- +--- before --- + + + + + +--- after --- + + + + + +--- replaceWith --- + + + + + diff --git a/ext/dom/tests/bug79968.phpt b/ext/dom/tests/bug79968.phpt index bfd69e69c971..5ce1bcb7c6e9 100644 --- a/ext/dom/tests/bug79968.phpt +++ b/ext/dom/tests/bug79968.phpt @@ -7,11 +7,14 @@ dom $cdata = new DOMText; -try { - $cdata->before("string"); -} catch (DOMException $e) { - echo $e->getMessage(); -} +$cdata->before("string"); +$cdata->after("string"); +$cdata->replaceWith("string"); + +$dom = new DOMDocument(); +$dom->adoptNode($cdata); +var_dump($dom->saveXML($cdata)); + ?> --EXPECT-- -Hierarchy Request Error +string(0) "" diff --git a/ext/dom/tests/element_child_and_parent_node_without_document.phpt b/ext/dom/tests/element_child_and_parent_node_without_document.phpt new file mode 100644 index 000000000000..a849135f6699 --- /dev/null +++ b/ext/dom/tests/element_child_and_parent_node_without_document.phpt @@ -0,0 +1,21 @@ +--TEST-- +DOMElement: DOMChildNode, DOMParentNode modifications without a document +--EXTENSIONS-- +dom +--FILE-- +append("APPENDED"); +$element->prepend("PREPENDED"); +$element->after("AFTER"); +$element->before("BEFORE"); +$element->replaceWith("REPLACE"); + +$doc = new DOMDocument(); +$doc->adoptNode($element); +echo $doc->saveXML($element), "\n"; + +?> +--EXPECT-- +

PREPENDED Hello World! APPENDED

From 620b6220c239370c419f61cfd776c05c60ec9b4e Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Tue, 8 Aug 2023 21:10:25 +0200 Subject: [PATCH 111/120] Optimize checks for DOMParentNode and DOMChildNode Because we check the list with dom_sanity_check_node_list_for_insertion() before dom_is_node_in_list(), then we don't have to check the object type anymore in dom_is_node_in_list(), because dom_sanity_check_node_list_for_insertion() will have already done that. Closes GH-11914. --- ext/dom/parentnode.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ext/dom/parentnode.c b/ext/dom/parentnode.c index fe928797a1d5..8b225d75c92c 100644 --- a/ext/dom/parentnode.c +++ b/ext/dom/parentnode.c @@ -128,12 +128,8 @@ static bool dom_is_node_in_list(const zval *nodes, uint32_t nodesc, const xmlNod { for (uint32_t i = 0; i < nodesc; i++) { if (Z_TYPE(nodes[i]) == IS_OBJECT) { - const zend_class_entry *ce = Z_OBJCE(nodes[i]); - - if (instanceof_function(ce, dom_node_class_entry)) { - if (dom_object_get_node(Z_DOMOBJ_P(nodes + i)) == node_to_find) { - return true; - } + if (dom_object_get_node(Z_DOMOBJ_P(nodes + i)) == node_to_find) { + return true; } } } From 788540ef2c7081ca05170f15030ccbefccb6c02a Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Thu, 10 Aug 2023 00:37:34 +0100 Subject: [PATCH 112/120] Remove remnant of COM_FIELD_LIST --- ext/mysqlnd/mysqlnd_result.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index 2c99635ec011..e627820712a6 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -152,8 +152,6 @@ MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND_ result->meta = NULL; DBG_RETURN(FAIL); } - /* COM_FIELD_LIST is broken and has premature EOF, thus we need to hack here and in mysqlnd_res_meta.c */ - result->field_count = result->meta->field_count; /* 2. Follows an EOF packet, which the client of mysqlnd_read_result_metadata() From 3af76b2302c2d91609c6165260df0e564897f6c2 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Thu, 10 Aug 2023 12:12:05 +0200 Subject: [PATCH 113/120] Fix curl_basic_009.phpt for newer curl versions --- ext/curl/tests/curl_basic_009.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/curl/tests/curl_basic_009.phpt b/ext/curl/tests/curl_basic_009.phpt index 26bc35891cca..564663f1d8f9 100644 --- a/ext/curl/tests/curl_basic_009.phpt +++ b/ext/curl/tests/curl_basic_009.phpt @@ -7,7 +7,7 @@ curl --FILE-- Date: Thu, 10 Aug 2023 12:39:37 +0200 Subject: [PATCH 114/120] Fix EXPECT for bug52820.phpt on newer curl versions New curl versions have a "processing: url" line. The connection number in "Closing connection" is apparently also dropped. --- ext/curl/tests/curl_basic_009.phpt | 3 ++- ext/standard/tests/file/bug52820.phpt | 28 +++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/ext/curl/tests/curl_basic_009.phpt b/ext/curl/tests/curl_basic_009.phpt index 564663f1d8f9..ade7cffcb828 100644 --- a/ext/curl/tests/curl_basic_009.phpt +++ b/ext/curl/tests/curl_basic_009.phpt @@ -7,7 +7,8 @@ curl --FILE-- ---EXPECTF-- -temp stream (close after): +--EXPECTREGEX-- +temp stream \(close after\): About to rewind! -* Couldn't open file /i_dont_exist/ -* Closing connection%A%d +(\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ +\* Closing connection( -?\d+)? -memory stream (close after): +memory stream \(close after\): About to rewind! -* Couldn't open file /i_dont_exist/ -* Closing connection%A%d +(\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ +\* Closing connection( -?\d+)? -temp stream (leak): +temp stream \(leak\): About to rewind! -* Couldn't open file /i_dont_exist/ -* Closing connection%A%d +(\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ +\* Closing connection( -?\d+)? -memory stream (leak): +memory stream \(leak\): About to rewind! -* Couldn't open file /i_dont_exist/ -* Closing connection%A%d +(\* processing: file:\/\/\/i_dont_exist\/\n)?\* Couldn't open file \/i_dont_exist\/ +\* Closing connection( -?\d+)? -Done. +Done\. From 90f514cf213829d53a3cb8f5fad2316b29631067 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 9 Aug 2023 14:15:38 +0200 Subject: [PATCH 115/120] Add Windows build to nightly Also stop running 32-bit in push, it's really not necessary. --- .github/actions/setup-windows/action.yml | 18 ++++++++++++ .github/workflows/nightly.yml | 35 ++++++++++++++++++++++++ .github/workflows/push.yml | 33 +++++----------------- 3 files changed, 60 insertions(+), 26 deletions(-) create mode 100644 .github/actions/setup-windows/action.yml diff --git a/.github/actions/setup-windows/action.yml b/.github/actions/setup-windows/action.yml new file mode 100644 index 000000000000..4786242455a1 --- /dev/null +++ b/.github/actions/setup-windows/action.yml @@ -0,0 +1,18 @@ +name: Setup +runs: + using: composite + steps: + - name: Setup MySQL + shell: pwsh + run: | + choco install mysql -y --no-progress --params="/port:3306" + mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;" + - name: Setup MSSQL + shell: pwsh + run: | + choco install sql-server-express -y --no-progress --install-arguments="/SECURITYMODE=SQL /SAPWD=Password12!" + - name: Setup PostgreSQL + shell: pwsh + run: | + Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running + pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" } diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index dff19b9c46a4..e098c904e3d2 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -645,3 +645,38 @@ jobs: uses: ./.github/actions/notify-slack with: token: ${{ secrets.ACTION_MONITORING_SLACK }} + WINDOWS: + strategy: + fail-fast: false + matrix: + include: + - x64: true + zts: true + opcache: true + - x64: false + zts: false + opcache: false + name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" + runs-on: windows-2019 + env: + PHP_BUILD_CACHE_BASE_DIR: C:\build-cache + PHP_BUILD_OBJ_DIR: C:\obj + PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk + PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0 + PHP_BUILD_CRT: vs16 + PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }} + THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}" + INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}" + PARALLEL: -j2 + OPCACHE: "${{ matrix.opcache && '1' || '0' }}" + steps: + - name: git config + run: git config --global core.autocrlf false && git config --global core.eol lf + - name: git checkout + uses: actions/checkout@v3 + - name: Setup + uses: ./.github/actions/setup-windows + - name: Build + run: .github/scripts/windows/build.bat + - name: Test + run: .github/scripts/windows/test.bat diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1984814eebdb..54279fb28f72 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -154,17 +154,7 @@ jobs: - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files WINDOWS: - strategy: - fail-fast: false - matrix: - include: - - x64: true - zts: false - opcache: true - - x64: false - zts: true - opcache: false - name: "WINDOWS_${{ matrix.x64 && 'X64' || 'X86' }}_${{ matrix.zts && 'ZTS' || 'NTS' }}" + name: WINDOWS_X64_ZTS runs-on: windows-2019 env: PHP_BUILD_CACHE_BASE_DIR: C:\build-cache @@ -172,27 +162,18 @@ jobs: PHP_BUILD_CACHE_SDK_DIR: C:\build-cache\sdk PHP_BUILD_SDK_BRANCH: php-sdk-2.2.0 PHP_BUILD_CRT: vs16 - PLATFORM: ${{ matrix.x64 && 'x64' || 'x86' }} - THREAD_SAFE: "${{ matrix.zts && '1' || '0' }}" - INTRINSICS: "${{ matrix.zts && 'AVX2' || '' }}" + PLATFORM: x64 + THREAD_SAFE: "1" + INTRINSICS: AVX2 PARALLEL: -j2 - OPCACHE: "${{ matrix.opcache && '1' || '0' }}" + OPCACHE: "1" steps: - name: git config run: git config --global core.autocrlf false && git config --global core.eol lf - name: git checkout uses: actions/checkout@v3 - - name: Setup MySQL - run: | - choco install mysql -y --no-progress --params="/port:3306" - mysql.exe --port=3306 --user=root --password="" -e "ALTER USER 'root'@'localhost' IDENTIFIED BY 'Password12!'; FLUSH PRIVILEGES;" - - name: Setup MSSQL - run: | - choco install sql-server-express -y --no-progress --install-arguments="/SECURITYMODE=SQL /SAPWD=Password12!" - - name: Setup PostgreSQL - run: | - Set-Service -Name "postgresql-x64-14" -StartupType manual -Status Running - pwsh -Command { $env:PGPASSWORD="root"; & "$env:PGBIN\psql" -U postgres -c "ALTER USER postgres WITH PASSWORD 'Password12!';" } + - name: Setup + uses: ./.github/actions/setup-windows - name: Build run: .github/scripts/windows/build.bat - name: Test From 248e6b04040a2968ef3a4115c3afed3de0498639 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Wed, 9 Aug 2023 14:20:39 +0200 Subject: [PATCH 116/120] Remove i386 Linux from push Testing this in nightly is sufficient. 32-bit problems are rare. Closes GH-11922 --- .github/workflows/push.yml | 44 -------------------------------------- 1 file changed, 44 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 54279fb28f72..10590f355424 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -77,50 +77,6 @@ jobs: -d opcache.jit_buffer_size=16M - name: Verify generated files are up to date uses: ./.github/actions/verify-generated-files - LINUX_X32: - name: LINUX_X32_DEBUG_ZTS - runs-on: ubuntu-latest - container: - image: ubuntu:20.04 - env: - MYSQL_TEST_HOST: mysql - PDO_MYSQL_TEST_DSN: mysql:host=mysql;dbname=test - PDO_MYSQL_TEST_HOST: mysql - services: - mysql: - image: mysql:8 - ports: - - 3306:3306 - env: - MYSQL_DATABASE: test - MYSQL_ROOT_PASSWORD: root - steps: - - name: git checkout - uses: actions/checkout@v3 - - name: apt - uses: ./.github/actions/apt-x32 - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: "${{github.job}}-${{hashFiles('main/php_version.h')}}" - append-timestamp: false - - name: ./configure - uses: ./.github/actions/configure-x32 - with: - configurationParameters: >- - --enable-debug - --enable-zts - - name: make - run: make -j$(/usr/bin/nproc) >/dev/null - - name: make install - uses: ./.github/actions/install-linux-x32 - - name: Test Tracing JIT - uses: ./.github/actions/test-linux - with: - runTestsParameters: >- - -d zend_extension=opcache.so - -d opcache.enable_cli=1 - -d opcache.jit_buffer_size=16M MACOS_DEBUG_NTS: runs-on: macos-11 steps: From 0d922aa59512a994336c243f1527258d09e4b3f8 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 9 Aug 2023 18:09:54 +0100 Subject: [PATCH 117/120] Fix error checking in mysqlnd Closes GH-11925 --- NEWS | 2 ++ ext/mysqlnd/mysqlnd_protocol_frame_codec.c | 1 + 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 8057a9cf0a73..b8bfcace9f65 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,8 @@ PHP NEWS . Fixed bug GH-11550 (MySQL Statement has a empty query result when the response field has changed, also Segmentation fault). (Yurunsoft) + . Fixed invalid error message "Malformed packet" when connection is dropped. + (Kamil Tekiela) - Opcache: . Fixed bug GH-11715 (opcache.interned_strings_buffer either has no effect or diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c index ca34108d7266..4fcf5fb9aa9e 100644 --- a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c +++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c @@ -202,6 +202,7 @@ MYSQLND_METHOD(mysqlnd_pfc, send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const v if (bytes_sent <= 0) { DBG_ERR_FMT("Can't %zu send bytes", count); SET_CLIENT_ERROR(error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone); + bytes_sent = 0; // the return type is unsigned and 0 represents an error condition } DBG_RETURN(bytes_sent); } From 4ad61f8d27c67fb25085f5d7fbf2342ff98998b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Wed, 26 Jul 2023 15:17:32 +0200 Subject: [PATCH 118/120] Add more test coverage for ext/odbc --- ext/odbc/tests/odbc_close_all_001.phpt | 38 +++++ ext/odbc/tests/odbc_commit_001.phpt | 31 ++++ ext/odbc/tests/odbc_cursor_001.phpt | 29 ++++ ext/odbc/tests/odbc_fetch_array_001.phpt | 46 ++++++ ext/odbc/tests/odbc_fetch_into_001.phpt | 59 +++++++ ext/odbc/tests/odbc_fetch_object_001.phpt | 46 ++++++ ext/odbc/tests/odbc_fetch_row_001.phpt | 52 +++++++ ext/odbc/tests/odbc_field_len_001.phpt | 43 ++++++ ext/odbc/tests/odbc_field_name_001.phpt | 42 +++++ ext/odbc/tests/odbc_field_num_001.phpt | 34 ++++ ext/odbc/tests/odbc_field_precision_001.phpt | 42 +++++ ext/odbc/tests/odbc_field_scale_001.phpt | 42 +++++ ext/odbc/tests/odbc_field_type_001.phpt | 42 +++++ ext/odbc/tests/odbc_gettypeinfo_001.phpt | 154 +++++++++++++++++++ ext/odbc/tests/odbc_longreadlen_001.phpt | 31 ++++ ext/odbc/tests/odbc_num_fields_001.phpt | 35 +++++ ext/odbc/tests/odbc_num_rows_001.phpt | 37 +++++ ext/odbc/tests/odbc_primarykeys_001.phpt | 37 +++++ ext/odbc/tests/odbc_rollback_001.phpt | 31 ++++ ext/odbc/tests/odbc_setoption_001.phpt | 24 +++ ext/odbc/tests/odbc_setoption_002.phpt | 25 +++ 21 files changed, 920 insertions(+) create mode 100644 ext/odbc/tests/odbc_close_all_001.phpt create mode 100644 ext/odbc/tests/odbc_commit_001.phpt create mode 100644 ext/odbc/tests/odbc_cursor_001.phpt create mode 100644 ext/odbc/tests/odbc_fetch_array_001.phpt create mode 100644 ext/odbc/tests/odbc_fetch_into_001.phpt create mode 100644 ext/odbc/tests/odbc_fetch_object_001.phpt create mode 100644 ext/odbc/tests/odbc_fetch_row_001.phpt create mode 100644 ext/odbc/tests/odbc_field_len_001.phpt create mode 100644 ext/odbc/tests/odbc_field_name_001.phpt create mode 100644 ext/odbc/tests/odbc_field_num_001.phpt create mode 100644 ext/odbc/tests/odbc_field_precision_001.phpt create mode 100644 ext/odbc/tests/odbc_field_scale_001.phpt create mode 100644 ext/odbc/tests/odbc_field_type_001.phpt create mode 100644 ext/odbc/tests/odbc_gettypeinfo_001.phpt create mode 100644 ext/odbc/tests/odbc_longreadlen_001.phpt create mode 100644 ext/odbc/tests/odbc_num_fields_001.phpt create mode 100644 ext/odbc/tests/odbc_num_rows_001.phpt create mode 100644 ext/odbc/tests/odbc_primarykeys_001.phpt create mode 100644 ext/odbc/tests/odbc_rollback_001.phpt create mode 100644 ext/odbc/tests/odbc_setoption_001.phpt create mode 100644 ext/odbc/tests/odbc_setoption_002.phpt diff --git a/ext/odbc/tests/odbc_close_all_001.phpt b/ext/odbc/tests/odbc_close_all_001.phpt new file mode 100644 index 000000000000..9641ac4bd7e4 --- /dev/null +++ b/ext/odbc/tests/odbc_close_all_001.phpt @@ -0,0 +1,38 @@ +--TEST-- +odbc_close_all(): Basic test +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +resource(5) of type (odbc link) +resource(7) of type (odbc link persistent) +resource(8) of type (odbc result) +resource(9) of type (odbc result) +resource(5) of type (Unknown) +resource(7) of type (Unknown) +resource(8) of type (Unknown) +resource(9) of type (Unknown) diff --git a/ext/odbc/tests/odbc_commit_001.phpt b/ext/odbc/tests/odbc_commit_001.phpt new file mode 100644 index 000000000000..5db0b0627e5b --- /dev/null +++ b/ext/odbc/tests/odbc_commit_001.phpt @@ -0,0 +1,31 @@ +--TEST-- +odbc_commit(): Basic test for odbc_commit() +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +bool(true) +string(1) "1" diff --git a/ext/odbc/tests/odbc_cursor_001.phpt b/ext/odbc/tests/odbc_cursor_001.phpt new file mode 100644 index 000000000000..b7111393d834 --- /dev/null +++ b/ext/odbc/tests/odbc_cursor_001.phpt @@ -0,0 +1,29 @@ +--TEST-- +Test odbc_cursor() +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +string(%d) "SQL_CUR%s" diff --git a/ext/odbc/tests/odbc_fetch_array_001.phpt b/ext/odbc/tests/odbc_fetch_array_001.phpt new file mode 100644 index 000000000000..b212adcb1f49 --- /dev/null +++ b/ext/odbc/tests/odbc_fetch_array_001.phpt @@ -0,0 +1,46 @@ +--TEST-- +odbc_fetch_array(): Getting data from query +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +array(1) { + ["foo"]=> + string(1) "1" +} +array(1) { + ["foo"]=> + string(1) "2" +} +array(1) { + ["foo"]=> + string(1) "3" +} +bool(false) diff --git a/ext/odbc/tests/odbc_fetch_into_001.phpt b/ext/odbc/tests/odbc_fetch_into_001.phpt new file mode 100644 index 000000000000..5053552ce5da --- /dev/null +++ b/ext/odbc/tests/odbc_fetch_into_001.phpt @@ -0,0 +1,59 @@ +--TEST-- +odbc_fetch_into(): Getting data from query +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +int(1) +array(1) { + [0]=> + string(1) "1" +} +int(1) +array(1) { + [0]=> + string(1) "2" +} +int(1) +array(1) { + [0]=> + string(1) "3" +} +bool(false) +array(0) { +} diff --git a/ext/odbc/tests/odbc_fetch_object_001.phpt b/ext/odbc/tests/odbc_fetch_object_001.phpt new file mode 100644 index 000000000000..4ea407562eb7 --- /dev/null +++ b/ext/odbc/tests/odbc_fetch_object_001.phpt @@ -0,0 +1,46 @@ +--TEST-- +odbc_fetch_object(): Getting data from query +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +object(stdClass)#%d (%d) { + ["foo"]=> + string(1) "1" +} +object(stdClass)#%d (%d) { + ["foo"]=> + string(1) "2" +} +object(stdClass)#%d (%d) { + ["foo"]=> + string(1) "3" +} +bool(false) diff --git a/ext/odbc/tests/odbc_fetch_row_001.phpt b/ext/odbc/tests/odbc_fetch_row_001.phpt new file mode 100644 index 000000000000..4cecb513a067 --- /dev/null +++ b/ext/odbc/tests/odbc_fetch_row_001.phpt @@ -0,0 +1,52 @@ +--TEST-- +odbc_fetch_row(): Getting data from query +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +bool(false) +bool(true) +string(1) "1" +bool(true) +string(1) "2" +bool(true) +string(1) "3" +bool(false) diff --git a/ext/odbc/tests/odbc_field_len_001.phpt b/ext/odbc/tests/odbc_field_len_001.phpt new file mode 100644 index 000000000000..b4697fff75f2 --- /dev/null +++ b/ext/odbc/tests/odbc_field_len_001.phpt @@ -0,0 +1,43 @@ +--TEST-- +odbc_field_len(): Getting the length of the field +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- +getMessage() . "\n"; +} +var_dump(odbc_field_len($res, 1)); +var_dump(odbc_field_len($res, 2)); +var_dump(odbc_field_len($res, 3)); +var_dump(odbc_field_len($res, 4)); + +odbc_close($conn); +?> +--CLEAN-- + +--EXPECTF-- +odbc_field_len(): Argument #2 ($field) must be greater than 0 +int(10) +int(2147483647) +int(50) + +Warning: odbc_field_len(): Field index larger than number of fields in %s on line %d +bool(false) diff --git a/ext/odbc/tests/odbc_field_name_001.phpt b/ext/odbc/tests/odbc_field_name_001.phpt new file mode 100644 index 000000000000..da34da9e022e --- /dev/null +++ b/ext/odbc/tests/odbc_field_name_001.phpt @@ -0,0 +1,42 @@ +--TEST-- +odbc_field_name(): Getting the name of the field +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- +getMessage() . "\n"; +} +var_dump(odbc_field_name($res, 1)); +var_dump(odbc_field_name($res, 2)); +var_dump(odbc_field_name($res, 3)); +var_dump(odbc_field_name($res, 4)); + +?> +--CLEAN-- + +--EXPECTF-- +odbc_field_name(): Argument #2 ($field) must be greater than 0 +string(3) "foo" +string(3) "bar" +string(3) "baz" + +Warning: odbc_field_name(): Field index larger than number of fields in %s on line %d +bool(false) diff --git a/ext/odbc/tests/odbc_field_num_001.phpt b/ext/odbc/tests/odbc_field_num_001.phpt new file mode 100644 index 000000000000..ab4bbcc4d00b --- /dev/null +++ b/ext/odbc/tests/odbc_field_num_001.phpt @@ -0,0 +1,34 @@ +--TEST-- +odbc_field_scale(): Getting the scale of the field +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECTF-- +int(1) +int(2) +int(3) +bool(false) diff --git a/ext/odbc/tests/odbc_field_precision_001.phpt b/ext/odbc/tests/odbc_field_precision_001.phpt new file mode 100644 index 000000000000..609401ba263c --- /dev/null +++ b/ext/odbc/tests/odbc_field_precision_001.phpt @@ -0,0 +1,42 @@ +--TEST-- +odbc_field_precision(): Getting the precision of the field +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- +getMessage() . "\n"; +} +var_dump(odbc_field_precision($res, 1)); +var_dump(odbc_field_precision($res, 2)); +var_dump(odbc_field_precision($res, 3)); +var_dump(odbc_field_precision($res, 4)); + +?> +--CLEAN-- + +--EXPECTF-- +odbc_field_precision(): Argument #2 ($field) must be greater than 0 +int(10) +int(7) +int(50) + +Warning: odbc_field_precision(): Field index larger than number of fields in %s on line %d +bool(false) diff --git a/ext/odbc/tests/odbc_field_scale_001.phpt b/ext/odbc/tests/odbc_field_scale_001.phpt new file mode 100644 index 000000000000..3bb2da8e1c2c --- /dev/null +++ b/ext/odbc/tests/odbc_field_scale_001.phpt @@ -0,0 +1,42 @@ +--TEST-- +odbc_field_scale(): Getting the scale of the field +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- +getMessage() . "\n"; +} +var_dump(odbc_field_scale($res, 1)); +var_dump(odbc_field_scale($res, 2)); +var_dump(odbc_field_scale($res, 3)); +var_dump(odbc_field_scale($res, 4)); + +?> +--CLEAN-- + +--EXPECTF-- +odbc_field_scale(): Argument #2 ($field) must be greater than 0 +int(0) +int(0) +int(0) + +Warning: odbc_field_scale(): Field index larger than number of fields in %s on line %d +bool(false) diff --git a/ext/odbc/tests/odbc_field_type_001.phpt b/ext/odbc/tests/odbc_field_type_001.phpt new file mode 100644 index 000000000000..81774c7dbc0e --- /dev/null +++ b/ext/odbc/tests/odbc_field_type_001.phpt @@ -0,0 +1,42 @@ +--TEST-- +odbc_field_type(): Getting the type of the field +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- +getMessage() . "\n"; +} +var_dump(odbc_field_type($res, 1)); +var_dump(odbc_field_type($res, 2)); +var_dump(odbc_field_type($res, 3)); +var_dump(odbc_field_type($res, 4)); + +?> +--CLEAN-- + +--EXPECTF-- +odbc_field_type(): Argument #2 ($field) must be greater than 0 +string(3) "int" +string(4) "text" +string(9) "varbinary" + +Warning: odbc_field_type(): Field index larger than number of fields in %s on line %d +bool(false) diff --git a/ext/odbc/tests/odbc_gettypeinfo_001.phpt b/ext/odbc/tests/odbc_gettypeinfo_001.phpt new file mode 100644 index 000000000000..76b06089181f --- /dev/null +++ b/ext/odbc/tests/odbc_gettypeinfo_001.phpt @@ -0,0 +1,154 @@ +--TEST-- +odbc_gettypeinfo(): Getting info about data types +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +array(20) { + ["TYPE_NAME"]=> + string(14) "datetimeoffset" + ["DATA_TYPE"]=> + string(4) "-155" + ["COLUMN_SIZE"]=> + string(2) "34" + ["LITERAL_PREFIX"]=> + string(1) "'" + ["LITERAL_SUFFIX"]=> + string(1) "'" + ["CREATE_PARAMS"]=> + string(5) "scale" + ["NULLABLE"]=> + string(1) "1" + ["CASE_SENSITIVE"]=> + string(1) "0" + ["SEARCHABLE"]=> + string(1) "3" + ["UNSIGNED_ATTRIBUTE"]=> + NULL + ["FIXED_PREC_SCALE"]=> + string(1) "0" + ["AUTO_UNIQUE_VALUE"]=> + NULL + ["LOCAL_TYPE_NAME"]=> + string(14) "datetimeoffset" + ["MINIMUM_SCALE"]=> + string(1) "0" + ["MAXIMUM_SCALE"]=> + string(1) "7" + ["SQL_DATA_TYPE"]=> + string(4) "-155" + ["SQL_DATETIME_SUB"]=> + string(1) "0" + ["NUM_PREC_RADIX"]=> + NULL + ["INTERVAL_PRECISION"]=> + NULL + ["USERTYPE"]=> + string(1) "0" +} +array(20) { + ["TYPE_NAME"]=> + string(4) "char" + ["DATA_TYPE"]=> + string(1) "1" + ["COLUMN_SIZE"]=> + string(4) "8000" + ["LITERAL_PREFIX"]=> + string(1) "'" + ["LITERAL_SUFFIX"]=> + string(1) "'" + ["CREATE_PARAMS"]=> + string(6) "length" + ["NULLABLE"]=> + string(1) "1" + ["CASE_SENSITIVE"]=> + string(1) "0" + ["SEARCHABLE"]=> + string(1) "3" + ["UNSIGNED_ATTRIBUTE"]=> + NULL + ["FIXED_PREC_SCALE"]=> + string(1) "0" + ["AUTO_UNIQUE_VALUE"]=> + NULL + ["LOCAL_TYPE_NAME"]=> + string(4) "char" + ["MINIMUM_SCALE"]=> + NULL + ["MAXIMUM_SCALE"]=> + NULL + ["SQL_DATA_TYPE"]=> + string(1) "1" + ["SQL_DATETIME_SUB"]=> + NULL + ["NUM_PREC_RADIX"]=> + NULL + ["INTERVAL_PRECISION"]=> + NULL + ["USERTYPE"]=> + string(1) "1" +} +array(20) { + ["TYPE_NAME"]=> + string(7) "numeric" + ["DATA_TYPE"]=> + string(1) "2" + ["COLUMN_SIZE"]=> + string(2) "38" + ["LITERAL_PREFIX"]=> + NULL + ["LITERAL_SUFFIX"]=> + NULL + ["CREATE_PARAMS"]=> + string(15) "precision,scale" + ["NULLABLE"]=> + string(1) "1" + ["CASE_SENSITIVE"]=> + string(1) "0" + ["SEARCHABLE"]=> + string(1) "2" + ["UNSIGNED_ATTRIBUTE"]=> + string(1) "0" + ["FIXED_PREC_SCALE"]=> + string(1) "0" + ["AUTO_UNIQUE_VALUE"]=> + string(1) "0" + ["LOCAL_TYPE_NAME"]=> + string(7) "numeric" + ["MINIMUM_SCALE"]=> + string(1) "0" + ["MAXIMUM_SCALE"]=> + string(2) "38" + ["SQL_DATA_TYPE"]=> + string(1) "2" + ["SQL_DATETIME_SUB"]=> + NULL + ["NUM_PREC_RADIX"]=> + string(2) "10" + ["INTERVAL_PRECISION"]=> + NULL + ["USERTYPE"]=> + string(2) "10" +} diff --git a/ext/odbc/tests/odbc_longreadlen_001.phpt b/ext/odbc/tests/odbc_longreadlen_001.phpt new file mode 100644 index 000000000000..d27fa8bf9581 --- /dev/null +++ b/ext/odbc/tests/odbc_longreadlen_001.phpt @@ -0,0 +1,31 @@ +--TEST-- +Test odbc_longreadlen() +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +string(4) "what" diff --git a/ext/odbc/tests/odbc_num_fields_001.phpt b/ext/odbc/tests/odbc_num_fields_001.phpt new file mode 100644 index 000000000000..b815c971e01c --- /dev/null +++ b/ext/odbc/tests/odbc_num_fields_001.phpt @@ -0,0 +1,35 @@ +--TEST-- +odbc_num_rows(): Getting the number of fields +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +int(3) +int(3) diff --git a/ext/odbc/tests/odbc_num_rows_001.phpt b/ext/odbc/tests/odbc_num_rows_001.phpt new file mode 100644 index 000000000000..8c2af1a1f147 --- /dev/null +++ b/ext/odbc/tests/odbc_num_rows_001.phpt @@ -0,0 +1,37 @@ +--TEST-- +odbc_num_rows(): Getting the number of rows +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +int(3) +int(0) diff --git a/ext/odbc/tests/odbc_primarykeys_001.phpt b/ext/odbc/tests/odbc_primarykeys_001.phpt new file mode 100644 index 000000000000..17b42c6ff51e --- /dev/null +++ b/ext/odbc/tests/odbc_primarykeys_001.phpt @@ -0,0 +1,37 @@ +--TEST-- +odbc_primarykeys(): Basic test for odbc_primarykeys() +--EXTENSIONS-- +odbc +--SKIPIF-- + +--XFAIL-- +Doesn't work with MS SQL +--FILE-- + +--CLEAN-- + +--EXPECT-- +bool(false) diff --git a/ext/odbc/tests/odbc_rollback_001.phpt b/ext/odbc/tests/odbc_rollback_001.phpt new file mode 100644 index 000000000000..6f4cf3d6926d --- /dev/null +++ b/ext/odbc/tests/odbc_rollback_001.phpt @@ -0,0 +1,31 @@ +--TEST-- +odbc_rollback(): Basic test for odbc_rollback() +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +bool(true) +bool(false) diff --git a/ext/odbc/tests/odbc_setoption_001.phpt b/ext/odbc/tests/odbc_setoption_001.phpt new file mode 100644 index 000000000000..3f2202100aa6 --- /dev/null +++ b/ext/odbc/tests/odbc_setoption_001.phpt @@ -0,0 +1,24 @@ +--TEST-- +odbc_setoption(): Basic test for odbc_setoption() +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--EXPECT-- +bool(true) +int(0) diff --git a/ext/odbc/tests/odbc_setoption_002.phpt b/ext/odbc/tests/odbc_setoption_002.phpt new file mode 100644 index 000000000000..e93d45b6fb41 --- /dev/null +++ b/ext/odbc/tests/odbc_setoption_002.phpt @@ -0,0 +1,25 @@ +--TEST-- +odbc_setoption(): Test for odbc_setoption() with persistent connection +--EXTENSIONS-- +odbc +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: odbc_setoption(): Unable to set option for persistent connection in %s on line %d +bool(false) +int(1) From f56ff74542acca04a935a46c53bf5ae3cdc9fee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Mon, 7 Aug 2023 09:55:28 +0200 Subject: [PATCH 119/120] Enable ext/odbc and ext/pdo_odbc tests on Linux in GitHub CI --- .github/actions/setup-x64/action.yml | 2 ++ .github/actions/test-linux/action.yml | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/actions/setup-x64/action.yml b/.github/actions/setup-x64/action.yml index 91cf7ea51c35..bec213375b7c 100644 --- a/.github/actions/setup-x64/action.yml +++ b/.github/actions/setup-x64/action.yml @@ -12,6 +12,8 @@ runs: # Ensure local_infile tests can run. mysql -uroot -proot -e "SET GLOBAL local_infile = true" docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "" -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;" + docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "" -Q "create login odbc_test with password='password', check_policy=off; create user odbc_test for login odbc_test; grant alter, control, delete to odbc_test;" + docker exec sql1 /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U SA -P "" -Q "ALTER SERVER ROLE sysadmin ADD MEMBER odbc_test;" sudo locale-gen de_DE ./.github/scripts/setup-slapd.sh diff --git a/.github/actions/test-linux/action.yml b/.github/actions/test-linux/action.yml index 9b7d0d100608..7657ff8c85ad 100644 --- a/.github/actions/test-linux/action.yml +++ b/.github/actions/test-linux/action.yml @@ -30,6 +30,10 @@ runs: export PDO_OCI_TEST_DSN="oci:dbname=localhost/XEPDB1;charset=AL32UTF8" export PGSQL_TEST_CONNSTR="host=postgres dbname=test port=5432 user=postgres password=postgres" export PDO_PGSQL_TEST_DSN="host=postgres dbname=test port=5432 user=postgres password=postgres" + export ODBC_TEST_USER="odbc_test" + export ODBC_TEST_PASS="password" + export ODBC_TEST_DSN="Driver={ODBC Driver 17 for SQL Server};Server=127.0.0.1;Database=master;uid=$ODBC_TEST_USER;pwd=$ODBC_TEST_PASS" + export PDO_ODBC_TEST_DSN="odbc:$ODBC_TEST_DSN" export SKIP_IO_CAPTURE_TESTS=1 export TEST_PHP_JUNIT=junit.out.xml export STACK_LIMIT_DEFAULTS_CHECK=1 From c40faa0730a14aa6c6c990003ff84c01062f05cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 8 Aug 2023 08:48:50 +0200 Subject: [PATCH 120/120] Fix ext/odbc tests --- ext/odbc/tests/bug44618.phpt | 8 +++++++- ext/odbc/tests/bug60616.phpt | 4 +++- ext/odbc/tests/bug73725.phpt | 4 ++-- ext/odbc/tests/odbc_exec_001.phpt | 18 ------------------ 4 files changed, 12 insertions(+), 22 deletions(-) diff --git a/ext/odbc/tests/bug44618.phpt b/ext/odbc/tests/bug44618.phpt index efead0e99518..5bb947a8bd06 100644 --- a/ext/odbc/tests/bug44618.phpt +++ b/ext/odbc/tests/bug44618.phpt @@ -3,7 +3,13 @@ Bug #44618 (Fetching may rely on uninitialized data) --EXTENSIONS-- odbc --SKIPIF-- - + --FILE-- +--XFAIL-- +Uses syntax incompatible with MS SQL (CREATE DATABASE ... ENCODING) --FILE-- string(3) "102" ["txt"]=> - string(12) "Müsliriegel" + string(17) "Lorem ipsum dolor" ["k"]=> string(2) "34" } diff --git a/ext/odbc/tests/odbc_exec_001.phpt b/ext/odbc/tests/odbc_exec_001.phpt index 649d940060cb..284279eb3ce5 100644 --- a/ext/odbc/tests/odbc_exec_001.phpt +++ b/ext/odbc/tests/odbc_exec_001.phpt @@ -16,32 +16,14 @@ include 'config.inc'; $conn = odbc_connect($dsn, $user, $pass); -odbc_exec($conn, 'foo', 'bar'); odbc_exec($conn, 'foo'); -odbc_exec($conn, '', ''); odbc_exec($conn, ''); -odbc_exec($conn, 1, 1); odbc_exec($conn, 1); -odbc_exec($conn, NULL, NULL); -odbc_exec($conn, NULL); - ?> --EXPECTF-- -Warning: odbc_exec(): Argument #3 must be of type int, string given in %s on line %d - -Warning: odbc_exec(): SQL error: %s in %s on line %d - -Warning: odbc_exec(): Argument #3 must be of type int, string given in %s on line %d - -Warning: odbc_exec(): SQL error: %s in %s on line %d - -Warning: odbc_exec(): SQL error: %s in %s on line %d - -Warning: odbc_exec(): SQL error: %s in %s on line %d - Warning: odbc_exec(): SQL error: %s in %s on line %d Warning: odbc_exec(): SQL error: %s in %s on line %d