You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #36907 Fixes sprintf(): Too few arguments in form transformer (pedrocasado)
This PR was merged into the 3.4 branch.
Discussion
----------
Fixes sprintf(): Too few arguments in form transformer
Similar to: #29482
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | none
| License | MIT
| Doc PR | none
Fixes the form reverse transformation when the method viewToNorm is called within a value with the character %:
Before : "sprintf(): Too few arguments"
After : Form reverse transformation works.
Reference : http://php.net/manual/function.sprintf.php
Commits
-------
ff7d3f4 Fixes sprintf(): Too few arguments in form transformer
thrownewTransformationFailedException(sprintf('Unable to transform data for property path "%s": '.$exception->getMessage(), $this->getPropertyPath()), $exception->getCode(), $exception);
1034
+
thrownewTransformationFailedException(sprintf('Unable to transform data for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception);
1035
1035
}
1036
1036
1037
1037
return$value;
@@ -1055,7 +1055,7 @@ private function normToModel($value)
thrownewTransformationFailedException(sprintf('Unable to reverse value for property path "%s": '.$exception->getMessage(), $this->getPropertyPath()), $exception->getCode(), $exception);
1058
+
thrownewTransformationFailedException(sprintf('Unable to reverse value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception);
1059
1059
}
1060
1060
1061
1061
return$value;
@@ -1086,7 +1086,7 @@ private function normToView($value)
thrownewTransformationFailedException(sprintf('Unable to transform value for property path "%s": '.$exception->getMessage(), $this->getPropertyPath()), $exception->getCode(), $exception);
1089
+
thrownewTransformationFailedException(sprintf('Unable to transform value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception);
1090
1090
}
1091
1091
1092
1092
return$value;
@@ -1112,7 +1112,7 @@ private function viewToNorm($value)
thrownewTransformationFailedException(sprintf('Unable to reverse value for property path "%s": '.$exception->getMessage(), $this->getPropertyPath()), $exception->getCode(), $exception);
1115
+
thrownewTransformationFailedException(sprintf('Unable to reverse value for property path "%s": ', $this->getPropertyPath()).$exception->getMessage(), $exception->getCode(), $exception);
0 commit comments