Bugfix: RainLoop\Common\PdoAbstract::getVersion(): Return value must be of type ?int, string returned

This commit is contained in:
the-djmaze 2022-09-23 09:11:29 +02:00
parent df34c4a0ae
commit 1dfb4c7d29

View file

@ -256,13 +256,12 @@ abstract class PdoAbstract
if ($oStmt->execute(array($sName))) if ($oStmt->execute(array($sName)))
{ {
$mRow = $oStmt->fetchAll(\PDO::FETCH_ASSOC); $mRow = $oStmt->fetchAll(\PDO::FETCH_ASSOC);
$sKey = 'value_int';
if ($mRow && isset($mRow[0]['value_int'])) if ($mRow && isset($mRow[0]['value_int']))
{ {
return $bReturnIntValue ? (int) $mRow[0]['value_int'] : (string) $mRow[0]['value_int']; return (int) $mRow[0]['value_int'];
} }
return $bReturnIntValue ? 0 : ''; return 0;
} }
} }