Fix install process

This commit is contained in:
Dennis Eichhorn 2017-12-01 10:28:12 +01:00
parent cfb8cad454
commit 879691d68d
2 changed files with 5 additions and 5 deletions

View File

@ -1494,7 +1494,7 @@ class DataMapperAbstract implements DataMapperInterface
}
$objects = $mapper::get($values);
$reflectionProperty->setValue($obj, !is_array($objects) ? [$objects] : $objects);
$reflectionProperty->setValue($obj, !is_array($objects) ? [$objects->getId() => $objects] : $objects);
if (!$accessible) {
$reflectionProperty->setAccessible(false);

View File

@ -107,6 +107,10 @@ class Dispatcher
$views = [];
$dispatch = explode(':', $controller);
if (!file_exists($path = __DIR__ . '/../../' . str_replace('\\', '/', $dispatch[0]) . '.php')) {
throw new PathException($path);
}
if (($c = count($dispatch)) === 3) {
/* Handling static functions */
$function = $dispatch[0] . '::' . $dispatch[2];
@ -170,10 +174,6 @@ class Dispatcher
private function getController(string $controller) /* : object */
{
if (!isset($this->controllers[$controller])) {
if (!file_exists($path = __DIR__ . '/../../' . str_replace('\\', '/', $controller) . '.php')) {
throw new PathException($path);
}
// If module controller use module manager for initialization
if (strpos('\Modules\Controller', $controller) === 0) {
$split = explode('\\', $controller);