#19 Bug PHP: Add Location

open
nobody
None
5
2009-11-06
2009-11-06
Anonymous
No

http://localhost/phpmyprepaid/phpmyprepaid.php
"Show Locations" => "Add Location" => "Add Location"
Catchable fatal error: Object of class User could not be converted to string in /usr/share/phpmyprepaid/www/include/divers/functions.php on line 461

Present
<?php
$query = "insert into user_location (locationid, userid,statusid) values ('$ID', '$userid',$oreon->user->get_status())";
$oreon->database->database->query ($query) or die("Query database error !");
?>

Should be
<?php
$query = "insert into user_location (locationid, userid,statusid) values ('$ID', '$userid','" . $oreon->user->get_status() . "')";
$oreon->database->database->query ($query) or die("Query database error !");
?>

Discussion