From aa8b6c982673f3c2ffcb27cdada534c7acdf302b Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Fri, 26 Jan 2018 00:58:15 +0100 Subject: Remove static $count property and use spl_object_hash() instead --- include/classes/BigPipe/Pagelet.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/classes/BigPipe/Pagelet.php') diff --git a/include/classes/BigPipe/Pagelet.php b/include/classes/BigPipe/Pagelet.php index 101ec34..441c520 100644 --- a/include/classes/BigPipe/Pagelet.php +++ b/include/classes/BigPipe/Pagelet.php @@ -16,7 +16,6 @@ class Pagelet extends Item { private $dependencies = []; private $tagname = 'div'; private $tagHTML = ''; - private static $count = 0; #=============================================================================== # Priorities for pagelet sorting @@ -37,7 +36,7 @@ class Pagelet extends Item { const PHASE_DONE = 4; # After the static JS code has been executed public function __construct($customID = NULL, $priority = self::PRIORITY_NORMAL) { - $this->ID = $customID ?? 'P'.++self::$count; + $this->ID = $customID ?? spl_object_hash($this); $this->priority = $priority; $this->resources = array_pad($this->resources, 2, []); -- cgit v1.2.3