Catchable Fatal Errpr...

  • bluefire
  • Born
  • Born
  • bluefire
  • Posts: 1

Post 3+ Months Ago

I am trying to run e-commerce PHP script. I am currently getting this error
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


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('"' => '&quot;', '\'' => '&#039;', '<' => '&lt;', '>' => '&gt;')) . '</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;
 
  }
 
?>
  1. ////
  2.  
  3. // Output a form hidden field
  4.  
  5.   function smn_draw_hidden_field($name, $value = '', $parameters = '') {
  6.  
  7.     $field = '<input type="hidden" name="' . smn_output_string($name) . '"';
  8.  
  9.  
  10.  
  11.     if (smn_not_null($value)) {
  12.  
  13.       $field .= ' value="' . smn_output_string($value) . '"';
  14.  
  15.     } elseif (isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {
  16.  
  17.       $field .= ' value="' . smn_output_string(stripslashes($GLOBALS[$name])) . '"';
  18.  
  19.     }
  20.  
  21.  
  22.  
  23.     if (smn_not_null($parameters)) $field .= ' ' . $parameters;
  24.  
  25.  
  26.  
  27.     $field .= '>';
  28.  
  29.  
  30.  
  31.     return $field;
  32.  
  33.   }
  34.  
  35.  
  36.  
  37. ////
  38.  
  39. // Output a form pull down menu
  40.  
  41.   function smn_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
  42.  
  43.     $field = '<select name="' . smn_output_string($name) . '"';
  44.  
  45.  
  46.  
  47.     if (smn_not_null($parameters)) $field .= ' ' . $parameters;
  48.  
  49.  
  50.  
  51.     $field .= '>';
  52.  
  53.  
  54.  
  55.     if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);
  56.  
  57.  
  58.  
  59.     for ($i=0, $n=sizeof($values); $i<$n; $i++) {
  60.  
  61.       $field .= '<option value="' . smn_output_string($values[$i]['id']) . '"';
  62.  
  63.       if ($default == $values[$i]['id']) {
  64.  
  65.         $field .= ' SELECTED';
  66.  
  67.       }
  68.  
  69.  
  70.  
  71.       $field .= '>' . smn_output_string($values[$i]['text'], array('"' => '&quot;', '\'' => '&#039;', '<' => '&lt;', '>' => '&gt;')) . '</option>';
  72.  
  73.     }
  74.  
  75.     $field .= '</select>';
  76.  
  77.  
  78.  
  79.     if ($required == true) $field .= TEXT_FIELD_REQUIRED;
  80.  
  81.  
  82.  
  83.     return $field;
  84.  
  85.   }
  86.  
  87.  
  88.  
  89.   function smn_draw_mselect_menu($name, $values, $selected_vals, $params = '', $required = false) {
  90.  
  91.     $field = '<select name="' . $name . '"';
  92.  
  93.     if ($params) $field .= ' ' . $params;
  94.  
  95.     $field .= ' multiple>';
  96.  
  97.     for ($i=0; $i<sizeof($values); $i++) {
  98.  
  99.     if ($values[$i]['id'])
  100.  
  101.     {
  102.  
  103.         $field .= '<option value="' . $values[$i]['id'] . '"';
  104.  
  105.         if ( ((strlen($values[$i]['id']) > 0) && ($GLOBALS[$name] == $values[$i]['id'])) ) {
  106.  
  107.           $field .= ' SELECTED';
  108.  
  109.         }
  110.  
  111.             else
  112.  
  113.         {
  114.  
  115.             for ($j=0; $j<sizeof($selected_vals); $j++) {
  116.  
  117.                 if ($selected_vals[$j]['id'] == $values[$i]['id'])
  118.  
  119.                 {
  120.  
  121.                     $field .= ' SELECTED';
  122.  
  123.                 }
  124.  
  125.             }
  126.  
  127.         }
  128.  
  129.     }
  130.  
  131.       $field .= '>' . $values[$i]['text'] . '</option>';
  132.  
  133.     }
  134.  
  135.     $field .= '</select>';
  136.  
  137.  
  138.  
  139.     if ($required) $field .= TEXT_FIELD_REQUIRED;
  140.  
  141.  
  142.  
  143.     return $field;
  144.  
  145.   }
  146.  
  147. ?>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ScienceOfSpock
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1892
  • Loc: Las Vegas

Post 3+ Months Ago

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:
Code: [ Select ]
$mall = new mall_setup( $parameters );
$mall .= "some text here";
 
  1. $mall = new mall_setup( $parameters );
  2. $mall .= "some text here";
  3.  

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.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 110 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.