Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Error gots thrown if a non Model ist in app/ folder
Browse files Browse the repository at this point in the history
I know it's not the nicest fix but maybe someone comes up with a better solution.

I had my helpers.php file in app/ and an error got thrown cause $classes[0] wasn't set.
  • Loading branch information
cmaerz authored and msonowal committed Jun 24, 2019
1 parent 9212a50 commit 221c380
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ function getClassNameFromFile($filePathName)
$classes[] = $class_name;
}
}

if (!isset($classes[0]) {
return 'no_class_found_in_file';
}
return $classes[0];
}

0 comments on commit 221c380

Please sign in to comment.