[wp-trac] [WordPress Trac] #26106: Passing empty array to wpdb::update() generates invalid SQL
WordPress Trac
noreply at wordpress.org
Wed Sep 3 16:33:47 UTC 2014
#26106: Passing empty array to wpdb::update() generates invalid SQL
--------------------------+-----------------------------
Reporter: Viper007Bond | Owner: wonderboymusic
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Database | Version:
Severity: normal | Resolution: wontfix
Keywords: dev-feedback | Focuses:
--------------------------+-----------------------------
Comment (by SergeyBiryukov):
`$wpdb->show_errors(false)` does not work as expected in [29664]:
{{{
............................................................. 61 / 2504
( 2%)
...........................SS...SSSSSS.............S...SS.... 122 / 2504
( 4%)
........SS................S...........SS...SSSSSS............ 183 / 2504
( 7%)
.S...SS............SS..........................S............. 244 / 2504
( 9%)
............................................................. 305 / 2504
( 12%)
.WordPress database error You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax
to use near '' at line 1 for query UPDATE `wptests_posts` SET `post_name`
= 'burrito' WHERE made by PHPUnit_TextUI_Command::main,
PHPUnit_TextUI_Command->run, PHPUnit_TextUI_TestRunner->doRun,
PHPUnit_Framework_TestSuite->run, PHPUnit_Framework_TestSuite->run,
PHPUnit_Framework_TestSuite->runTest, PHPUnit_Framework_TestCase->run,
PHPUnit_Framework_TestResult->run, PHPUnit_Framework_TestCase->runBare,
PHPUnit_Framework_TestCase->runTest, ReflectionMethod->invokeArgs,
Tests_DB->test_empty_where_on_update
}}}
[attachment:26106.3.diff] fixes that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26106#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list