WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#2913 closed defect (bug) (fixed)

Cannot use a scalar value as an array ver 2.1

Reported by: dpace Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.1
Component: General Keywords:
Focuses: Cc:

Description

I am getting the following error message from a release of 2.1 installed this morning.

Cannot use a scalar value as an array in /home/content/c/e/r/cerca/html/wp-includes/wp-db.php on line 174

The web site is at http://www.mycerca.org and the message is displayed on the bottom of the page. I do not see anything else that seems obvious. This error is consistant among most Themes other than the default one.

Change History (10)

comment:1 darkfate8 years ago

  • Resolution set to invalid
  • Status changed from new to closed

I don't see it there.

comment:2 darkfate8 years ago

Besides, you shouldn't be using 2.1 for a live site yet.

comment:3 darkfate8 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

I don't see a problem within the code either:

$this->last_result[$num_rows] = $row;

...unless it should be

$this->last_result->$num_rows = $row;

I don't think that is valid code though :p

comment:4 dpace8 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed

I am having to move the site from test to production in a few days so I am downgrading the code back to stable. Still seeing the error in a lot of cases with 2.1. Seems to be something with the theme in use but I can not narrow it down. Thanks for the help

comment:5 donncha8 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

This error can be fixed by unsetting $this->last_result before it's used in $wpdb->query()

comment:6 ryan8 years ago

flush() is called from query() and sets last_result to null. We can either unset it last_result within flush() or set it to an empty array.

comment:7 ryan8 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [4092]) Init last_result to an empty array. fixes #2913

comment:8 ryan8 years ago

(In [4225]) Init last_result to an empty array. fixes #2913

comment:9 foolswisdom8 years ago

  • Milestone set to 2.0.5

comment:10 anonymous7 years ago

  • Milestone 2.0.5 deleted

Milestone 2.0.5 deleted

Note: See TracTickets for help on using tickets.