mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-12 03:30:12 +08:00
Merge pull request #1121 from mongosoft/master
Missing return statement
This commit is contained in:
@@ -1266,6 +1266,8 @@ class ActiveRecord extends Model
|
||||
$relation = $this->$getter();
|
||||
if ($relation instanceof ActiveRelation) {
|
||||
return $relation;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} catch (UnknownMethodException $e) {
|
||||
throw new InvalidParamException(get_class($this) . ' has no relation named "' . $name . '".', 0, $e);
|
||||
|
||||
@@ -118,6 +118,8 @@ class Schema extends \yii\db\Schema
|
||||
if ($this->findColumns($table)) {
|
||||
$this->findForeignKeys($table);
|
||||
return $table;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -203,6 +203,8 @@ class GettextMoFile extends GettextFile
|
||||
{
|
||||
if ($byteCount > 0) {
|
||||
return fread($fileHandle, $byteCount);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user