From: Jörn Friedrich Dreyer Date: Tue, 9 Jul 2013 11:17:01 +0000 (+0200) Subject: always return int X-Git-Tag: v6.0.0alpha2~379^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=05fa55f2eb6997f3b59a2418a64447427a1b19ec;p=nextcloud-server.git always return int --- diff --git a/lib/db.php b/lib/db.php index e70d66fc2ba..dd48c329490 100644 --- a/lib/db.php +++ b/lib/db.php @@ -344,7 +344,7 @@ class OC_DB { $result = self::executeAudited('SELECT lastval() AS id'); $row = $result->fetchRow(); self::raiseExceptionOnError($row, 'fetching row for insertid failed'); - return $row['id']; + return (int)$row['id']; } else if( $type === 'mssql') { if($table !== null) { $prefix = OC_Config::getValue( "dbtableprefix", "oc_" ); @@ -368,7 +368,7 @@ class OC_DB { $result = self::$connection->lastInsertId($table); } self::raiseExceptionOnError($result, 'insertid failed'); - return $result; + return (int)$result; } /**