always return int

This commit is contained in:
Jörn Friedrich Dreyer 2013-07-09 13:17:01 +02:00 committed by Andreas Fischer
parent 7e5ae8d780
commit 05fa55f2eb
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
/**