Project

General

Profile

Bug #12

array to string conversion

Added by j miller about 6 years ago. Updated about 4 years ago.

Status:
On Hold
Priority:
Low
Assignee:
-
Target version:
Start date:
01/26/2013
Due date:
% Done:

0%


Description

I had one user complain about an "Array to string conversion" errors from a bot when preparing to store the "request_entity" information into the data base. I could not reproduce the error. The code causing the error is from "bb2_insert" in "bad-behavior-mysql.php" is "$request_entity .= bb2_db_escape("$h: $v\n");"

I applied an band-aid to stop the errors by using "if (is_array($v)) break;" to bypass the error before the code in "bb2_insert" . The data stored in $package['request_entity'] from "core.inc.php" is storing the array causing the error. Not sure if this data should be an array.

Please look into the cause of the error.

History

#1 Updated by Michael Hampton almost 6 years ago

  • Tracker changed from Feature to Bug
  • Status changed from New to In Progress
  • Priority changed from Normal to Low

I have a pretty good idea what this is. PHP allows form inputs to contain [] brackets thus creating an entity value which is an array when the form is processed. This isn't very often used, though, it seems, as it's the first time I've heard of it being an issue. That said, I have a pretty good idea how to fix the code.

#2 Updated by Michael Hampton almost 6 years ago

  • Target version set to 3.0

#3 Updated by Michael Hampton about 4 years ago

  • Status changed from In Progress to Accepted

#4 Updated by Michael Hampton about 4 years ago

  • Status changed from Accepted to In Progress

#5 Updated by Michael Hampton about 4 years ago

  • Status changed from In Progress to On Hold

A workaround has been committed for this in changeset 1055175

A full fix will have to wait for 3.0.

Also available in: Atom PDF