Don't die horribly from sql.php when making INSERT/DELETE/UPDATE/CREATE TABLE/etc...
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 1 Aug 2008 21:00:24 +0000 (21:00 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 1 Aug 2008 21:00:24 +0000 (21:00 +0000)
commitdff6e3ae0bd10b041f2b4dc2e899516c0607c6ae
treec8be427428c018ade433b299fc5fb4036d51a5f9
parentf2422f373e40eb9ca7334447c4cc8da4957f5ee2
Don't die horribly from sql.php when making INSERT/DELETE/UPDATE/CREATE TABLE/etc calls that return 'true' instead of a result object.
Code was attempting to handle this case by asking the result object for its db so we can ask for the affected row count -- obviously that doesn't do so good when the result is not an object.
Changed Database::sourceStream() to send itself as the second parameter to the result-handling callback, so the callback knows which DB to check.
includes/db/Database.php
maintenance/sql.php