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