1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 05:37:39 +02:00

PostgreDriver::getInsertId() Ensuring that an integer is returned, if postgres returned a string (#271)

This commit is contained in:
Sean Snyder
2017-12-21 11:02:16 -08:00
committed by David Grudl
parent cac571ee60
commit 5046929e28

View File

@@ -199,7 +199,7 @@ class PostgreDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
}
$row = $res->fetch(false);
return is_array($row) ? $row[0] : null;
return is_array($row) ? (int) $row[0] : null;
}