Commit 12507291 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Correction de bug : si des setters étaneitn définis le transtypage cassait tout

parent ce97fc19
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Application/src/Hydrator/GenericHydrator.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -95,8 +95,8 @@ class GenericHydrator implements HydratorInterface
    {
        foreach ($this->elements as $name => $params) {
            if (!in_array($name, $this->noGenericParse)) {
                $type     = isset($params['type']) ? $params['type'] : null;
                $setter   = isset($params['setter']) ? $params['setter'] : 'set' . ucfirst($name);
                $type     = ($setter instanceof \Closure) ? 'string' : (isset($params['type']) ? $params['type'] : null);
                $readOnly = isset($params['readonly']) ? (bool)$params['readonly'] : false;

                if ($readOnly || !isset($data[$name])) continue;