Skip to content

Commit

Permalink
PHP8 fix for strlen() for CargoStore
Browse files Browse the repository at this point in the history
Bug: T341408
Change-Id: Iccde6f6137f389b01db28f78acb4f92ee129cd61
  • Loading branch information
yaronkoren authored and mszabo-wikia committed Mar 14, 2024
1 parent 3e132df commit 2a81e48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/parserfunctions/CargoStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,9 @@ public static function doesRowAlreadyExist( $cdb, $title, $tableName, $tableFiel
$fieldSize = $fieldDescription->getFieldSize();
}

if ( $fieldValue === '' ) {
if ( $fieldValue === null ) {
// Do nothing.
} elseif ( $fieldValue === '' ) {
// Needed for correct SQL handling of blank values, for some reason.
$fieldValue = null;
} elseif ( $fieldSize != null && strlen( $fieldValue ) > $fieldSize ) {
Expand Down

0 comments on commit 2a81e48

Please sign in to comment.