Last modified: 2011-11-25 07:36:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29542, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27542 - database::update $conds default causes database::makeList failure
database::update $conds default causes database::makeList failure
Status: NEW
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.17.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-18 19:10 UTC by Amgine
Modified: 2011-11-25 07:36 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Amgine 2011-02-18 19:10:07 UTC
"Database::makeList called with incorrect parameters" does not unambiguously show error is with database::update calling parameters.

Possible fix:
if ( is_array( $conds ) ) {
    $sql .= " WHERE " . $this->makeList( $conds, LIST_AND );
}elseif( $conds != '*' ){
    throw new DBUnexpectedError( $this, 'DatabaseBase::update called with incorrect $conds parameter' );
}
Comment 1 Sam Reed (reedy) 2011-02-18 19:11:25 UTC
	function update( $table, $values, $conds, $fname = 'DatabaseBase::update', $options = array() ) {

and

	function makeList( $a, $mode = LIST_COMMA ) {

Neither of those actually have a default! :)
Comment 2 Amgine 2011-02-19 22:29:52 UTC
if( is_null( $cond ) ) echo "default still fails";

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links