Skip to content

Commit

Permalink
DWF : singleton correction
Browse files Browse the repository at this point in the history
  • Loading branch information
legagneur-matthieu committed Jul 4, 2018
1 parent e016ce5 commit 7364315
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dwf/class/singleton.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ class singleton {
public static function get_instance() {
$class = get_called_class();
if (!isset(self::$_instances[$class])) {
self::$_instances[$class] = true;
(new ReflectionMethod($class, "__construct"))->invokeArgs($ins = new $class(), func_get_args());
self::$_instances[$class] = $ins;
(new ReflectionMethod($class, "__construct"))->invokeArgs(self::$_instances[$class] = new $class(), func_get_args());
}
return self::$_instances[$class];
}
Expand Down

0 comments on commit 7364315

Please sign in to comment.