Results 1 to 3 of 3

Heavy problems with passed variable and member function

This is a discussion on Heavy problems with passed variable and member function within the osCommerce 2.2 Installation Help forums, part of the osCommerce 2.2 Forums category; Hello osCdox Forum, I set up a new shop and now some things don't work. I really don't know why. ...

      
  1. #1
    Lurker
    Join Date
    Sep 2003
    Posts
    2
    Rep Power
    0


    Default Heavy problems with passed variable and member function

    Hello osCdox Forum,

    I set up a new shop and now some things don't work. I really don't know why.
    Maybe someone could help, this would be really great.

    Thanks in advance
    Markus

    If a new customer registers then the following warnings appear:

    error message:
    Warning: reset() [function.reset]: Passed variable is not an array or object in /www/htdocs/karaoke/catalog/includes/classes/email.php on line 71

    Warning: Variable passed to each() is not an array or object in /www/htdocs/karaoke/catalog/includes/classes/email.php on line 72

    Fatal error: Call to a member function on a non-object in /www/htdocs/karaoke/catalog/includes/functions/general.php on line 971

    So I tried toi find something about it, but didn't know what to do. Honestly I'm not that good in PHP and SQL.


    email.php @ Lines 20 - 77:
    class email {
    var $html;
    var $text;
    var $output;
    var $html_text;
    var $html_images;
    var $image_types;
    var $build_params;
    var $attachments;
    var $headers;

    function email($headers = '') {
    if ($headers == '') $headers = array();

    $this->html_images = array();
    $this->headers = array();

    if (EMAIL_LINEFEED == 'CRLF') {
    $this->lf = "\r\n";
    } else {
    $this->lf = "\n";
    }

    /**
    * If you want the auto load functionality
    * to find other mime-image/file types, add the
    * extension and content type here.
    */

    $this->image_types = array('gif' => 'image/gif',
    'jpg' => 'image/jpeg',
    'jpeg' => 'image/jpeg',
    'jpe' => 'image/jpeg',
    'bmp' => 'image/bmp',
    'png' => 'image/png',
    'tif' => 'image/tiff',
    'tiff' => 'image/tiff',
    'swf' => 'application/x-shockwave-flash');

    $this->build_params['html_encoding'] = 'quoted-printable';
    $this->build_params['text_encoding'] = '7bit';
    $this->build_params['html_charset'] = constant('CHARSET');
    $this->build_params['text_charset'] = constant('CHARSET');
    $this->build_params['text_wrap'] = 998;

    /**
    * Make sure the MIME version header is first.
    */

    $this->headers[] = 'MIME-Version: 1.0';

    reset($headers);
    while (list(,$value) = each($headers)) {
    if (tep_not_null($value)) {
    $this->headers[] = $value;
    }
    }
    }

    And, general.php, Lines 962 - 979:
    function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {
    if (SEND_EMAILS != 'true') return false;

    // Instantiate a new mail object
    $message = new email(array('X-Mailer: osCommerce Mailer'));

    // Build the text version
    $text = strip_tags($email_text);
    if (EMAIL_USE_HTML == 'true') {
    $message->add_html($email_text, $text);
    } else {
    $message->add_text($text);
    }

    // Send message
    $message->build_message();
    $message->send($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject);
    }

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    Default

    What are your server specs?
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    Lurker
    Join Date
    Sep 2003
    Posts
    2
    Rep Power
    0

Similar Threads

  1. PayPal error "Call to a member function on a non-object
    By brendanl79 in forum osCmax v2 Customization/Mods
    Replies: 13
    Last Post: 06-29-2007, 01:20 PM
  2. PayPal error "Call to a member function on a non-object
    By brendanl79 in forum osCMax v2 Features Discussion
    Replies: 1
    Last Post: 10-12-2006, 10:12 PM
  3. CVV - full value not being passed through
    By betagirl in forum osCmax v2 Installation issues
    Replies: 0
    Last Post: 09-12-2006, 09:09 AM
  4. Problems removing Review function
    By InfernoX in forum osCmax v2 Customization/Mods
    Replies: 5
    Last Post: 10-27-2005, 02:56 PM
  5. What is passed to constructor of tableBox ? ($contents)
    By raj in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 04-09-2004, 02:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •