Skip to content

Commit

Permalink
Fixed #3934
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Mar 4, 2019
1 parent ca1f664 commit a9aebe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Fixed a bug where Craft wasn’t always preselecting the correct tab on Control Panel pages if the tab name contained non-ASCII characters. ([#3923](https://github.com/craftcms/cms/issues/3923))
- Fixed a bug where the `--uid` option on `resave/*` console commands wasn’t working.
- Fixed a SQL error that could occur when running `resave/*` console commands.
- Fixed a PHP error that occurred when calling the deprecated `getError()` method on a model that had no errors. ([#3934](https://github.com/craftcms/cms/issues/3934))

## 3.1.15 - 2019-02-26

Expand Down
4 changes: 2 additions & 2 deletions src/base/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ public function hasErrors($attribute = null)
* Returns the first error of the specified attribute.
*
* @param string $attribute The attribute name.
* @return string The error message. Null is returned if no error.
* @return string|null The error message, or null if there are no errors.
* @deprecated in 3.0. Use [[getFirstError()]] instead.
*/
public function getError(string $attribute): string
public function getError(string $attribute)
{
Craft::$app->getDeprecator()->log('Model::getError()', 'getError() has been deprecated. Use getFirstError() instead.');

Expand Down

0 comments on commit a9aebe4

Please sign in to comment.