mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-07 16:06:53 +00:00
Use spl_object_id() instead of spl_object_hash()
This commit is contained in:
@@ -42,7 +42,7 @@ final class SafeAnalysisNodeVisitor implements NodeVisitorInterface
|
||||
*/
|
||||
public function getSafe(Node $node)
|
||||
{
|
||||
$hash = spl_object_hash($node);
|
||||
$hash = spl_object_id($node);
|
||||
if (!isset($this->data[$hash])) {
|
||||
return [];
|
||||
}
|
||||
@@ -64,7 +64,7 @@ final class SafeAnalysisNodeVisitor implements NodeVisitorInterface
|
||||
|
||||
private function setSafe(Node $node, array $safe): void
|
||||
{
|
||||
$hash = spl_object_hash($node);
|
||||
$hash = spl_object_id($node);
|
||||
if (isset($this->data[$hash])) {
|
||||
foreach ($this->data[$hash] as &$bucket) {
|
||||
if ($bucket['key'] === $node) {
|
||||
|
||||
Reference in New Issue
Block a user