Page 1 of 1

Fatal error: Cannot create references to/from string offsets

Posted: Mon Nov 29, 2004 10:14 pm
by james_madrid
hello there, im beginner in php programming.

when i run this script the error appear is "Fatal error: Cannot create references to/from string offsets nor overloaded objects in core24.php on line 296.


what is the possible solution for this script?


function save_orderinfo(&$frm) {
global $USER;

$order = new Object();
$order->customer = $frm["customer"];
$order->email = $frm["email"]; //MADE ADDITIONAL BY JDJ
$order->contact = $frm["contact"];
$order->cellno = $frm["cellno"];
$order->address = $frm["address"];
$order->city = $frm["city"];
$USER["orderinfo"] = &$order;
}

Posted: Tue Nov 30, 2004 2:18 am
by harsha
the indexing $frm["blah blah"] is not correct

dump $frm using print_r($frm);

and see what is the indexing

example:

frm(
0 => "some string",
1 => "another"
)

might be like this try out :-)