mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Fix Bug PHP 7.3 & L5.8 (#774)
add cast (string) to disable bug ($type can be null)
This commit is contained in:
committed by
Barry vd. Heuvel
parent
754bb4d075
commit
0fad511954
@@ -480,7 +480,7 @@ class ModelsCommand extends Command
|
||||
'morphedByMany' => '\Illuminate\Database\Eloquent\Relations\MorphToMany'
|
||||
) as $relation => $impl) {
|
||||
$search = '$this->' . $relation . '(';
|
||||
if (stripos($code, $search) || stripos($impl, $type) !== false) {
|
||||
if (stripos($code, $search) || stripos($impl, (string)$type) !== false) {
|
||||
//Resolve the relation's model to a Relation object.
|
||||
$methodReflection = new \ReflectionMethod($model, $method);
|
||||
if ($methodReflection->getNumberOfParameters()) {
|
||||
|
||||
Reference in New Issue
Block a user