Catchable Fatal Errpr...
- bluefire
- Born


- Joined: Nov 04, 2008
- Posts: 1
- Status: Offline
I am trying to run e-commerce PHP script. I am currently getting this error
Any ideas on how I can fix this? Thanks
Quote:
Switch to New Store :
Catchable fatal error: Object of class mall_setup could not be converted to string in /includes/functions/html_output.php on line 320
Catchable fatal error: Object of class mall_setup could not be converted to string in /includes/functions/html_output.php on line 320
Any ideas on how I can fix this? Thanks
Code: [ Select ]
////
// Output a form hidden field
function smn_draw_hidden_field($name, $value = '', $parameters = '') {
$field = '<input type="hidden" name="' . smn_output_string($name) . '"';
if (smn_not_null($value)) {
$field .= ' value="' . smn_output_string($value) . '"';
} elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {
$field .= ' value="' . smn_output_string(stripslashes($GLOBALS[$name])) . '"';
}
if (smn_not_null($parameters)) $field .= ' ' . $parameters;
$field .= '>';
return $field;
}
////
// Output a form pull down menu
function smn_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
$field = '<select name="' . smn_output_string($name) . '"';
if (smn_not_null($parameters)) $field .= ' ' . $parameters;
$field .= '>';
if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);
for ($i=0, $n=sizeof($values); $i<$n; $i++) {
$field .= '<option value="' . smn_output_string($values[$i]['id']) . '"';
if ($default == $values[$i]['id']) {
$field .= ' SELECTED';
}
$field .= '>' . smn_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
}
$field .= '</select>';
if ($required == true) $field .= TEXT_FIELD_REQUIRED;
return $field;
}
function smn_draw_mselect_menu($name, $values, $selected_vals, $params = '', $required = false) {
$field = '<select name="' . $name . '"';
if ($params) $field .= ' ' . $params;
$field .= ' multiple>';
for ($i=0; $i<sizeof($values); $i++) {
if ($values[$i]['id'])
{
$field .= '<option value="' . $values[$i]['id'] . '"';
if ( ((strlen($values[$i]['id']) > 0) && ($GLOBALS[$name] == $values[$i]['id'])) ) {
$field .= ' SELECTED';
}
else
{
for ($j=0; $j<sizeof($selected_vals); $j++) {
if ($selected_vals[$j]['id'] == $values[$i]['id'])
{
$field .= ' SELECTED';
}
}
}
}
$field .= '>' . $values[$i]['text'] . '</option>';
}
$field .= '</select>';
if ($required) $field .= TEXT_FIELD_REQUIRED;
return $field;
}
?>
// Output a form hidden field
function smn_draw_hidden_field($name, $value = '', $parameters = '') {
$field = '<input type="hidden" name="' . smn_output_string($name) . '"';
if (smn_not_null($value)) {
$field .= ' value="' . smn_output_string($value) . '"';
} elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {
$field .= ' value="' . smn_output_string(stripslashes($GLOBALS[$name])) . '"';
}
if (smn_not_null($parameters)) $field .= ' ' . $parameters;
$field .= '>';
return $field;
}
////
// Output a form pull down menu
function smn_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
$field = '<select name="' . smn_output_string($name) . '"';
if (smn_not_null($parameters)) $field .= ' ' . $parameters;
$field .= '>';
if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);
for ($i=0, $n=sizeof($values); $i<$n; $i++) {
$field .= '<option value="' . smn_output_string($values[$i]['id']) . '"';
if ($default == $values[$i]['id']) {
$field .= ' SELECTED';
}
$field .= '>' . smn_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
}
$field .= '</select>';
if ($required == true) $field .= TEXT_FIELD_REQUIRED;
return $field;
}
function smn_draw_mselect_menu($name, $values, $selected_vals, $params = '', $required = false) {
$field = '<select name="' . $name . '"';
if ($params) $field .= ' ' . $params;
$field .= ' multiple>';
for ($i=0; $i<sizeof($values); $i++) {
if ($values[$i]['id'])
{
$field .= '<option value="' . $values[$i]['id'] . '"';
if ( ((strlen($values[$i]['id']) > 0) && ($GLOBALS[$name] == $values[$i]['id'])) ) {
$field .= ' SELECTED';
}
else
{
for ($j=0; $j<sizeof($selected_vals); $j++) {
if ($selected_vals[$j]['id'] == $values[$i]['id'])
{
$field .= ' SELECTED';
}
}
}
}
$field .= '>' . $values[$i]['text'] . '</option>';
}
$field .= '</select>';
if ($required) $field .= TEXT_FIELD_REQUIRED;
return $field;
}
?>
- ////
- // Output a form hidden field
- function smn_draw_hidden_field($name, $value = '', $parameters = '') {
- $field = '<input type="hidden" name="' . smn_output_string($name) . '"';
- if (smn_not_null($value)) {
- $field .= ' value="' . smn_output_string($value) . '"';
- } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {
- $field .= ' value="' . smn_output_string(stripslashes($GLOBALS[$name])) . '"';
- }
- if (smn_not_null($parameters)) $field .= ' ' . $parameters;
- $field .= '>';
- return $field;
- }
- ////
- // Output a form pull down menu
- function smn_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
- $field = '<select name="' . smn_output_string($name) . '"';
- if (smn_not_null($parameters)) $field .= ' ' . $parameters;
- $field .= '>';
- if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);
- for ($i=0, $n=sizeof($values); $i<$n; $i++) {
- $field .= '<option value="' . smn_output_string($values[$i]['id']) . '"';
- if ($default == $values[$i]['id']) {
- $field .= ' SELECTED';
- }
- $field .= '>' . smn_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
- }
- $field .= '</select>';
- if ($required == true) $field .= TEXT_FIELD_REQUIRED;
- return $field;
- }
- function smn_draw_mselect_menu($name, $values, $selected_vals, $params = '', $required = false) {
- $field = '<select name="' . $name . '"';
- if ($params) $field .= ' ' . $params;
- $field .= ' multiple>';
- for ($i=0; $i<sizeof($values); $i++) {
- if ($values[$i]['id'])
- {
- $field .= '<option value="' . $values[$i]['id'] . '"';
- if ( ((strlen($values[$i]['id']) > 0) && ($GLOBALS[$name] == $values[$i]['id'])) ) {
- $field .= ' SELECTED';
- }
- else
- {
- for ($j=0; $j<sizeof($selected_vals); $j++) {
- if ($selected_vals[$j]['id'] == $values[$i]['id'])
- {
- $field .= ' SELECTED';
- }
- }
- }
- }
- $field .= '>' . $values[$i]['text'] . '</option>';
- }
- $field .= '</select>';
- if ($required) $field .= TEXT_FIELD_REQUIRED;
- return $field;
- }
- ?>
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
November 4th, 2008, 1:42 am
- ScienceOfSpock
- Mastermind


- Joined: Jul 06, 2004
- Posts: 1890
- Loc: Las Vegas
- Status: Offline
well, the code you pasted doesn't appear to have anything to do with the error, but it appears as if you are trying to instantiate the class mall_setup and then convert it to a string, possibly by appending text to it, like this:
or
Look in html_output.php at line 320. If you don't find anything there, search the file for "new mall_setup" (without the quotes) and paste the code that you find here.
Code: [ Select ]
$mall = new mall_setup( $parameters );
$mall .= "some text here";
$mall .= "some text here";
- $mall = new mall_setup( $parameters );
- $mall .= "some text here";
or
Code: [ Select ]
$mall = new mall_setup( $parameters ) . "some text here";
Look in html_output.php at line 320. If you don't find anything there, search the file for "new mall_setup" (without the quotes) and paste the code that you find here.
Page 1 of 1
To Reply to this topic you need to LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 2 posts
- Users browsing this forum: No registered users and 128 guests
- You cannot post new topics in this forum
- You cannot reply to topics in this forum
- You cannot edit your posts in this forum
- You cannot delete your posts in this forum
- You cannot post attachments in this forum
