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/Resource.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/classes/BigPipe/Resource.php') diff --git a/include/classes/BigPipe/Resource.php b/include/classes/BigPipe/Resource.php index 4711d48..2ba216d 100644 --- a/include/classes/BigPipe/Resource.php +++ b/include/classes/BigPipe/Resource.php @@ -11,7 +11,6 @@ namespace BigPipe; abstract class Resource extends Item { private $type = ''; private $resourceURL = ''; - private static $count = 0; #=============================================================================== # Render resource HTML for disabled pipeline @@ -35,7 +34,7 @@ abstract class Resource extends Item { # Build resource #=============================================================================== public function __construct($customID = NULL, $type, $resourceURL) { - $this->ID = $customID ?? 'R'.++self::$count; + $this->ID = $customID ?? spl_object_hash($this); $this->type = $type; $this->resourceURL = $resourceURL; -- cgit v1.2.3