if there is no constructor (this means a model which does not inherit from Model) newInstance will throw an exception. Conflicts: lib/Cake/Utility/ClassRegistry.php
@@ -158,7 +158,11 @@ class ClassRegistry {
}
- $instance = $reflection->newInstance($settings);
+ if ($reflection->getConstructor()) {
+ $instance = $reflection->newInstance($settings);
+ } else {
+ $instance = $reflection->newInstance();
+ }
if ($strict) {
$instance = ($instance instanceof Model) ? $instance : null;