mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Fix install process
This commit is contained in:
parent
cfb8cad454
commit
879691d68d
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user