always return int
This commit is contained in:
parent
7e5ae8d780
commit
05fa55f2eb
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue