Skip to content

Commit

Permalink
I really don't know PHP
Browse files Browse the repository at this point in the history
If the prefix table is empty, PHP spergs and there's an empty delimeter
  • Loading branch information
p0wer0n committed Jan 30, 2017
1 parent 793832e commit 3368e24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Model/SchemaManager.php
Expand Up @@ -55,7 +55,7 @@ public static function forge(\Doctrine\DBAL\Connection $connection, $prefix = ''
// get rid of the tables that don't have the same prefix
if ($prefix !== null) {
foreach ($tables as $key => $table) {
if (strpos($table->getName(), $new->prefix) !== 0) {
if (($table->getName() !="" AND $new->prefix !="") AND (strpos($table->getName(), $new->prefix) !== 0)) {
unset($tables[$key]);
}
}
Expand All @@ -72,7 +72,7 @@ public static function forge(\Doctrine\DBAL\Connection $connection, $prefix = ''
if (count($prefixes_ignored)) {
foreach ($tables as $key => $table) {
foreach ($prefixes_ignored as $prefix_ignored) {
if (strpos($table->getName(), $new->prefix.$prefix_ignored) === 0) {
if (($table->getName() !="" AND $new->prefix.$prefix_ignored !="") AND (strpos($table->getName(), $new->prefix.$prefix_ignored) === 0)) {
unset($tables[$key]);
}
}
Expand Down

0 comments on commit 3368e24

Please sign in to comment.