joomla/joomla-platform — pull request #1510 by stefanneculai (2012-09-01 18:12:55+00:00)
Title: Fix insertid() returned value.

As PHP documentations says mysqli and PDO do not return integers all the time.
- mysqli::$insert_id: The value of the AUTO_INCREMENT field that was updated by the previous query. Returns zero if there was no previous query on the connection or if the query did not update an AUTO_INCREMENT value. Note: If the number is greater than maximal int value, mysqli_insert_id() will return a string.
- PDO::lastInsertId: If a sequence name was not specified for the name parameter, PDO::lastInsertId() returns a string representing the row ID of the last row that was inserted into the database. If a sequence name was specified for the name parameter, PDO::lastInsertId() returns a string representing the last value retrieved from the specified sequence object.

insertid from the other database drivers and they return integers.