diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-07-09 13:17:01 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2013-07-29 02:17:09 +0200 |
commit | 05fa55f2eb6997f3b59a2418a64447427a1b19ec (patch) | |
tree | 809c7a29760db12c4f85517ff647ea1b3b4c0396 /lib/db.php | |
parent | 7e5ae8d78082891386f170d2d3db9b7ca7436e4c (diff) | |
download | nextcloud-server-05fa55f2eb6997f3b59a2418a64447427a1b19ec.tar.gz nextcloud-server-05fa55f2eb6997f3b59a2418a64447427a1b19ec.zip |
always return int
Diffstat (limited to 'lib/db.php')
-rw-r--r-- | lib/db.php | 4 |
1 files changed, 2 insertions, 2 deletions
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; } /** |