FIx: Missing checks
This commit is contained in:
parent
6472a36fed
commit
04655146f3
|
@ -100,7 +100,7 @@ public static function handles(Bundle $bundle): bool
|
||||||
{
|
{
|
||||||
$parts = preg_split('#/#', $bundle->getPath(), -1, PREG_SPLIT_NO_EMPTY);
|
$parts = preg_split('#/#', $bundle->getPath(), -1, PREG_SPLIT_NO_EMPTY);
|
||||||
|
|
||||||
if ($parts[0] !== 'critiques' || count($parts) !== 3) {
|
if (empty($parts) || $parts[0] !== 'critiques' || count($parts) !== 3) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,11 @@ public static function handles(Bundle $bundle): bool
|
||||||
{
|
{
|
||||||
$parts = preg_split('#/#', $bundle->getPath(), -1, PREG_SPLIT_NO_EMPTY);
|
$parts = preg_split('#/#', $bundle->getPath(), -1, PREG_SPLIT_NO_EMPTY);
|
||||||
|
|
||||||
if ($parts[0] !== 'collections' || $parts[1] !== 'lego' || count($parts) !== 4) {
|
if (empty($parts)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($parts) || $parts[0] !== 'collections' || empty($parts[1]) || $parts[1] !== 'lego' || count($parts) !== 4) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user