Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#2913 closed defect (bug) (fixed)

Cannot use a scalar value as an array ver 2.1

Reported by: dpace's profile 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)

#1 @darkfate
19 years ago

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

I don't see it there.

#2 @darkfate
19 years ago

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

#3 @darkfate
19 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

#4 @dpace
19 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

#5 @donncha
19 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()

#6 @ryan
19 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.

#7 @ryan
19 years ago

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

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

#8 @ryan
18 years ago

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

#9 @foolswisdom
18 years ago

  • Milestone set to 2.0.5

#10 @(none)
18 years ago

  • Milestone 2.0.5 deleted

Milestone 2.0.5 deleted

Note: See TracTickets for help on using tickets.