Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Do not call a constructor if there aren't one.

This will fix a lot of unittests failing.
  • Loading branch information...
commit 3a11bb2f6696fb29716126cdffdf131b5cea3921 1 parent cf408d7
@stojg stojg 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.