Commit ccb310cf by Alexander Makarov

Merge pull request #1121 from mongosoft/master

Missing return statement
parents 62148a2e 18fbd751
...@@ -1266,6 +1266,8 @@ class ActiveRecord extends Model ...@@ -1266,6 +1266,8 @@ class ActiveRecord extends Model
$relation = $this->$getter(); $relation = $this->$getter();
if ($relation instanceof ActiveRelation) { if ($relation instanceof ActiveRelation) {
return $relation; return $relation;
} else {
return null;
} }
} catch (UnknownMethodException $e) { } catch (UnknownMethodException $e) {
throw new InvalidParamException(get_class($this) . ' has no relation named "' . $name . '".', 0, $e); throw new InvalidParamException(get_class($this) . ' has no relation named "' . $name . '".', 0, $e);
......
...@@ -118,6 +118,8 @@ class Schema extends \yii\db\Schema ...@@ -118,6 +118,8 @@ class Schema extends \yii\db\Schema
if ($this->findColumns($table)) { if ($this->findColumns($table)) {
$this->findForeignKeys($table); $this->findForeignKeys($table);
return $table; return $table;
} else {
return null;
} }
} }
......
...@@ -203,6 +203,8 @@ class GettextMoFile extends GettextFile ...@@ -203,6 +203,8 @@ class GettextMoFile extends GettextFile
{ {
if ($byteCount > 0) { if ($byteCount > 0) {
return fread($fileHandle, $byteCount); return fread($fileHandle, $byteCount);
} else {
return null;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment