Merge pull request #18040 from kamil-tekiela/Remove-old-!==-null-check

Remove old !== null check
This commit is contained in:
Maurício Meneghini Fauth 2023-01-26 22:42:05 -03:00 committed by GitHub
commit 655ce1d59b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 16 deletions

View File

@ -1581,21 +1581,16 @@ class Util
if (str_contains($string, '@COLUMNS@')) {
$columnsList = $GLOBALS['dbi']->getColumns($GLOBALS['db'], $GLOBALS['table']);
// sometimes the table no longer exists at this point
if ($columnsList !== null) {
$columnNames = [];
foreach ($columnsList as $column) {
if ($escape !== null) {
$columnNames[] = self::$escape($column['Field']);
} else {
$columnNames[] = $column['Field'];
}
$columnNames = [];
foreach ($columnsList as $column) {
if ($escape !== null) {
$columnNames[] = self::$escape($column['Field']);
} else {
$columnNames[] = $column['Field'];
}
$replace['@COLUMNS@'] = implode(',', $columnNames);
} else {
$replace['@COLUMNS@'] = '*';
}
$replace['@COLUMNS@'] = implode(',', $columnNames);
}
/* Do the replacement */

View File

@ -13895,9 +13895,6 @@
<code>(int) $timestamp</code>
<code>(int) $timestamp</code>
</RedundantCastGivenDocblockType>
<RedundantCondition occurrences="1">
<code>$columnsList !== null</code>
</RedundantCondition>
</file>
<file src="libraries/classes/Utils/ForeignKey.php">
<RedundantCastGivenDocblockType occurrences="1">