Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #81 from stojg/release/object-create

MINOR Object::create should not call a constructor if there aren't one.
  • Loading branch information...
commit d88b39f292981fe4b03295bf33f6064d839d6eb7 2 parents 244f070 + 3a11bb2
@sminnee sminnee authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 core/Object.php
View
5 core/Object.php 100644 → 100755
@@ -85,7 +85,10 @@ public static function create() {
$args = func_get_args();
$class = self::getCustomClass(array_shift($args));
$reflector = new ReflectionClass($class);
- return $reflector->newInstanceArgs($args);
+ if($reflector->getConstructor()) {
+ return $reflector->newInstanceArgs($args);
+ }
+ return new $class;
}
private static $_cache_inst_args = array();
Please sign in to comment.
Something went wrong with that request. Please try again.