← All changes
|
vendor_prefixed/masterminds/html5/src/HTML5/Parser/DOMTreeBuilder.php
+3
-3
1.9.16
→
1.10.19
View file →
| @@ -307,11 +307,11 @@ | ||
| 307 | 307 | // When we add some namespacess, we have to track them. Later, when "endElement" is invoked, we have to remove them. |
| 308 | 308 | // When we are on a void tag, we do not need to care about namesapce nesting. |
| 309 | 309 | if ($pushes > 0 && !Elements::isA($name, Elements::VOID_TAG)) { |
| 310 | 310 | // PHP tends to free the memory used by DOM, |
| 311 | - // to avoid spl_object_hash collisions whe have to avoid garbage collection of $ele storing it into $pushes | |
| 311 | + // to avoid spl_object_id collisions we have to avoid garbage collection of $ele storing it into $pushes | |
| 312 | 312 | // see https://bugs.php.net/bug.php?id=67459 |
| 313 | - $this->pushes[\spl_object_hash($ele)] = array($pushes, $ele); | |
| 313 | + $this->pushes[\spl_object_id($ele)] = array($pushes, $ele); | |
| 314 | 314 | } |
| 315 | 315 | foreach ($attributes as $aName => $aVal) { |
| 316 | 316 | // xmlns attributes can't be set |
| 317 | 317 | if ('xmlns' === $aName) { |
| @@ -402,9 +402,9 @@ | ||
| 402 | 402 | // Special case handling for SVG. |
| 403 | 403 | if ($this->insertMode === static::IM_IN_SVG) { |
| 404 | 404 | $lname = Elements::normalizeSvgElement($lname); |
| 405 | 405 | } |
| 406 | - $cid = \spl_object_hash($this->current); | |
| 406 | + $cid = \spl_object_id($this->current); | |
| 407 | 407 | // XXX: HTML has no parent. What do we do, though, |
| 408 | 408 | // if this element appears in the wrong place? |
| 409 | 409 | if ('html' === $lname) { |
| 410 | 410 | return; |