mirror of
https://github.com/php/php-src.git
synced 2026-04-04 14:42:49 +02:00
Merge branch 'PHP-7.4'
This commit is contained in:
@@ -13,11 +13,11 @@ $document->appendChild($root);
|
||||
|
||||
$cdata = $document->createCDATASection('test');
|
||||
$root->appendChild($cdata);
|
||||
$cdata->deleteData(5, 1);
|
||||
try {
|
||||
$cdata->deleteData(5, 1);
|
||||
} catch (DOMException $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught DOMException: Index Size Error in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): DOMCharacterData->deleteData(5, 1)
|
||||
#1 {main}
|
||||
thrown in %s on line %d
|
||||
--EXPECT--
|
||||
Index Size Error
|
||||
|
||||
@@ -8,12 +8,11 @@ Eric Lee Stewart <ericleestewart@gmail.com>
|
||||
--FILE--
|
||||
<?php
|
||||
$fragment = new DOMDocumentFragment();
|
||||
$fragment->appendXML('<bait>crankbait</bait>');
|
||||
$document->appendChild($fragment);
|
||||
try {
|
||||
$fragment->appendXML('<bait>crankbait</bait>');
|
||||
} catch (DOMException $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught DOMException: No Modification Allowed Error in %s:%d
|
||||
Stack trace:
|
||||
#0 %s(%d): DOMDocumentFragment->appendXML('<bait>crankbait...')
|
||||
#1 {main}
|
||||
thrown in %s on line %d
|
||||
--EXPECT--
|
||||
No Modification Allowed Error
|
||||
|
||||
@@ -9,10 +9,11 @@ require_once __DIR__ .'/skipif.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
DOMDocument::saveHTMLFile();
|
||||
try {
|
||||
DOMDocument::saveHTMLFile();
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Non-static method DOMDocument::saveHTMLFile() cannot be called statically in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
--EXPECT--
|
||||
Non-static method DOMDocument::saveHTMLFile() cannot be called statically
|
||||
|
||||
@@ -9,10 +9,11 @@ require_once __DIR__ .'/skipif.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
DOMDocument::saveHTML(true);
|
||||
try {
|
||||
DOMDocument::saveHTML(true);
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Non-static method DOMDocument::saveHTML() cannot be called statically in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
--EXPECT--
|
||||
Non-static method DOMDocument::saveHTML() cannot be called statically
|
||||
|
||||
@@ -9,10 +9,11 @@ require_once __DIR__ .'/skipif.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
DOMDocument::validate();
|
||||
try {
|
||||
DOMDocument::validate();
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught Error: Non-static method DOMDocument::validate() cannot be called statically in %s:%d
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line %d
|
||||
--EXPECT--
|
||||
Non-static method DOMDocument::validate() cannot be called statically
|
||||
|
||||
@@ -27,16 +27,16 @@ unset($attr);
|
||||
$doc->registerNodeClass('DOMAttr', NULL);
|
||||
$attr = $root->getAttributeNode('a');
|
||||
echo get_class($attr), "\n";
|
||||
print $attr->testit()."\n";
|
||||
try {
|
||||
print $attr->testit()."\n";
|
||||
} catch (Error $e) {
|
||||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
myElement
|
||||
HELLO Element
|
||||
myAttribute
|
||||
HELLO Attribute
|
||||
DOMAttr
|
||||
|
||||
Fatal error: Uncaught Error: Call to undefined method DOMAttr::testit() in %s:25
|
||||
Stack trace:
|
||||
#0 {main}
|
||||
thrown in %s on line 25
|
||||
Call to undefined method DOMAttr::testit()
|
||||
|
||||
Reference in New Issue
Block a user