Commit 1efb97e1 authored by Mpro's avatar Mpro

Oprava var_export pro Restriction, ktera ma nekonecnou rekurzi

parent 020293c3
...@@ -38,10 +38,14 @@ class Repository extends AbstractRepository ...@@ -38,10 +38,14 @@ class Repository extends AbstractRepository
if ($row === FALSE) { if ($row === FALSE) {
if (is_callable($notFoundCallback)) { if (is_callable($notFoundCallback)) {
$notFoundCallback($id); $notFoundCallback($id);
} else {
if ($id instanceof Restriction) {
throw new InvalidArgumentException('Not found');
} else { } else {
throw new InvalidArgumentException('Not found: ' . var_export($id, TRUE)); throw new InvalidArgumentException('Not found: ' . var_export($id, TRUE));
} }
} }
}
return $this->createEntity($row); return $this->createEntity($row);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment