Skip to content

Commit 08d6bf2

Browse files
committed
minor #13314 [Form] tweaked a deprecation message (fabpot)
This PR was merged into the 2.7 branch. Discussion ---------- [Form] tweaked a deprecation message | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a While upgrading an app to 2.7, I found this message unclear. To be honest, and like many developers, I did not read the entire message and I missed the "cast to a string" part. Commits ------- a396b41 [Form] tweaked a deprecation message
2 parents 7222de3 + dfcbb2f commit 08d6bf2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ public function getErrors($deep = false, $flatten = true)
848848
*/
849849
public function getErrorsAsString($level = 0)
850850
{
851-
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the Form::getErrors(true, false) method instead and cast the result to a string.', E_USER_DEPRECATED);
851+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use (string) Form::getErrors(true, false) instead.', E_USER_DEPRECATED);
852852

853853
return self::indent((string) $this->getErrors(true, false), $level);
854854
}

0 commit comments

Comments
 (0)