Ticket #2913 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Cannot use a scalar value as an array ver 2.1

Reported by: dpace Assigned to: anonymous
Priority: normal Milestone:
Component: General Version: 2.1
Severity: normal Keywords:
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

07/05/06 22:06:17 changed by darkfate

  • status changed from new to closed.
  • resolution set to invalid.

I don't see it there.

07/05/06 22:07:44 changed by darkfate

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

07/05/06 22:13:05 changed by darkfate

  • status changed from closed to reopened.
  • resolution deleted.

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

07/06/06 23:46:57 changed by dpace

  • status changed from reopened to closed.
  • resolution set to invalid.

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

08/10/06 09:59:35 changed by donncha

  • status changed from closed to reopened.
  • resolution deleted.

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

08/10/06 22:19:59 changed by ryan

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.

08/11/06 22:23:05 changed by ryan

  • status changed from reopened to closed.
  • resolution set to fixed.

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

09/25/06 01:46:24 changed by ryan

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

09/25/06 04:09:23 changed by foolswisdom

  • milestone set to 2.0.5.

11/30/06 19:41:51 changed by

  • milestone deleted.

Milestone 2.0.5 deleted