Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2013
    Posts
    808
    Plugin Contributions
    0

    Default Missing argument 4 for emp_order_observer::update()

    ok its been a couple of days since i changed over to a newer computer (Hosting my own site using ispconfig3) and i am getting a couple of errors
    1. [08-Dec-2015 09:05:24 America/New_York] PHP Warning: Missing argument 4 for emp_order_observer::update(), called in /var/www/clients/client1/web5/web/includes/classes/class.base.php on line 58 and defined in /var/www/clients/client1/web5/web/includes/classes/observers/class.emp_order_observer.php on line 30
    [08-Dec-2015 09:05:24 America/New_York] PHP Warning: Missing argument 5 for emp_order_observer::update(), called in /var/www/clients/client1/web5/web/includes/classes/class.base.php on line 58 and defined in /var/www/clients/client1/web5/web/includes/classes/observers/class.emp_order_observer.php on line 30

    here is line 30 of class_base.php
    */
    function attach(&$observer, $eventIDArray) {
    foreach($eventIDArray as $eventID) {
    $nameHash = md5(get_class($observer).$eventID);
    base::setStaticObserver($nameHash, array('obs'=>&$observer, 'eventID'=>$eventID));
    }
    }
    /**
    Last edited by jimmie; 9 Dec 2015 at 02:15 AM.

  2. #2
    Join Date
    Jan 2013
    Posts
    808
    Plugin Contributions
    0

    Default Re: Log errors

    correction
    here is line 58 of class_base.php
    foreach($observers as $key=>$obs) {
    if ($obs['eventID'] == $eventID) {
    $obs['obs']->update($this, $eventID, $paramArray);
    }
    and line 30 of class.emp_order_observer.php
    function update (&$class, $eventID, $p1a, &$p2, &$p3) {

  3. #3
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Log errors

    class.emp_order_observer.php

    Appears to have been written somewhat for ZC 1.5.3+ because it is passing extra variables and that is not something included with the default ZC 1.5.1. Also the variables do not have an auto-assign if no other value is provided therefore a value must be passed to it for it not to report an issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Log errors

    jimmie,

    Can you please provide the information outlined in posting tips at the top when you reply
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Log errors

    It sounds like you didn't copy over the updated version of /includes/classes/class.base.php when you moved/upgraded the site. The plugin (Encrypted Master Password) includes some pre-v1.5.3 modules to also copy; the class file is one of them.

  6. #6
    Join Date
    Jan 2013
    Posts
    808
    Plugin Contributions
    0

    Default Re: Log errors

    trying to merge this bit of code
    Code:
    case 'NOTIFY_PROCESS_3RD_PARTY_LOGINS': {
           // BOF POS Login 1/2
    	   if(isset($_SESSION['POStoken'])) {
    		if (!$p3 && zen_not_null ($p2)) {
              $check = $db->Execute ("SELECT admin_id, admin_pass FROM " . TABLE_ADMIN . " WHERE admin_id = " . (int)EMP_LOGIN_ADMIN_ID);
              if (!$check->EOF && !zen_validate_password ($p2, $check->fields['admin_pass'])) {
                $p3 = true;
                $_SESSION['emp_admin_login'] = true;
                $_SESSION['emp_admin_id'] = EMP_LOGIN_ADMIN_ID;
                    
              } else {
                $admin_profiles = $db->Execute ("SELECT admin_id, admin_pass FROM " . TABLE_ADMIN . " WHERE admin_profile IN (" . preg_replace('/[^0-9,]/', '', EMP_LOGIN_ADMIN_PROFILE_ID) . ")");
                while (!$admin_profiles->EOF && !$p3) {
                  $p3 = zen_validate_password($p2, $admin_profiles->fields['admin_pass']);
                  if (!$p3) {
                    $_SESSION['emp_admin_login'] = true;
                    $_SESSION['emp_admin_id'] = $admin_profiles->fields['admin_id'];
                    
                  }
                  $admin_profiles->MoveNext();
                  
                }
              }
              
              if ($p3) {
                $sql_data_array = array ( 'access_date' => 'now()',
                  'admin_id' => $_SESSION['emp_admin_id'],
                  'page_accessed' => 'login.php',
                  'page_parameters' => '',
                  'ip_address' => substr ($_SERVER['REMOTE_ADDR'],0,45),
                  'gzpost' => gzdeflate (json_encode (array ( 'action' => 'emp_admin_login' )), 7),
                  'flagged' => 0,
                  'attention' => '',
                );
                zen_db_perform (TABLE_ADMIN_ACTIVITY_LOG, $sql_data_array);
                
              }
            }
    	   } else {
    	   // EOF POS Login 1/2
    		   if (!$p3 && zen_not_null ($p2)) {
              $check = $db->Execute ("SELECT admin_id, admin_pass FROM " . TABLE_ADMIN . " WHERE admin_id = " . (int)EMP_LOGIN_ADMIN_ID);
              if (!$check->EOF && zen_validate_password ($p2, $check->fields['admin_pass'])) {
                $p3 = true;
                $_SESSION['emp_admin_login'] = true;
                $_SESSION['emp_admin_id'] = EMP_LOGIN_ADMIN_ID;
                    
              } else {
                $admin_profiles = $db->Execute ("SELECT admin_id, admin_pass FROM " . TABLE_ADMIN . " WHERE admin_profile IN (" . preg_replace('/[^0-9,]/', '', EMP_LOGIN_ADMIN_PROFILE_ID) . ")");
                while (!$admin_profiles->EOF && !$p3) {
                  $p3 = zen_validate_password($p2, $admin_profiles->fields['admin_pass']);
                  if ($p3) {
                    $_SESSION['emp_admin_login'] = true;
                    $_SESSION['emp_admin_id'] = $admin_profiles->fields['admin_id'];
                    
                  }
                  $admin_profiles->MoveNext();
                  
                }
              }
              
              if ($p3) {
                $sql_data_array = array ( 'access_date' => 'now()',
                  'admin_id' => $_SESSION['emp_admin_id'],
                  'page_accessed' => 'login.php',
                  'page_parameters' => '',
                  'ip_address' => substr ($_SERVER['REMOTE_ADDR'],0,45),
                  'gzpost' => gzdeflate (json_encode (array ( 'action' => 'emp_admin_login' )), 7),
                  'flagged' => 0,
                  'attention' => '',
                );
                zen_db_perform (TABLE_ADMIN_ACTIVITY_LOG, $sql_data_array);
                
              }
            }
    	   // BOF POS Login 2/2
    	   }
    	   // EOF POS Login 2/2
            break;
            
          }
          default: {
            break;
            
          }
        }
      }
     
    }
    with this
    Code:
    case 'NOTIFY_PROCESS_3RD_PARTY_LOGINS':
    			
                    if (!$p3 && zen_not_null($p2)) {
                        $pwd2 = htmlspecialchars($p2, ENT_COMPAT, CHARSET);
                        $check = $db->Execute(
                            "SELECT admin_id, admin_pass 
                               FROM " . TABLE_ADMIN . " 
                              WHERE admin_id = " . (int)EMP_LOGIN_ADMIN_ID . "
                              LIMIT 1"
                        );
                        if (!$check->EOF && (zen_validate_password($p2, $check->fields['admin_pass']) || zen_validate_password($pwd2, $check->fields['admin_pass']))) {
                            $p3 = true;
                            $_SESSION['emp_admin_login'] = true;
                            $_SESSION['emp_admin_id'] = EMP_LOGIN_ADMIN_ID;
                            
                        } else {
                            $admin_profiles = $db->Execute(
                                "SELECT admin_id, admin_pass 
                                   FROM " . TABLE_ADMIN . " 
                                  WHERE admin_profile IN (" . preg_replace('/[^0-9,]/', '', EMP_LOGIN_ADMIN_PROFILE_ID) . ")"
                            );
                            while (!$admin_profiles->EOF && !$p3) {
                                $p3 = (zen_validate_password($p2, $admin_profiles->fields['admin_pass']) || zen_validate_password($pwd2, $admin_profiles->fields['admin_pass']));
                                if ($p3) {
                                    $_SESSION['emp_admin_login'] = true;
                                    $_SESSION['emp_admin_id'] = $admin_profiles->fields['admin_id'];
                                }
                                $admin_profiles->MoveNext();
                            }
                        }
                      
                        if ($p3) {
                            $_SESSION['emp_customer_email_address'] = $p1a;
                            $sql_data_array = array( 
                                'access_date' => 'now()',
                                'admin_id' => $_SESSION['emp_admin_id'],
                                'page_accessed' => 'login.php',
                                'page_parameters' => '',
                                'ip_address' => substr($_SERVER['REMOTE_ADDR'],0,45),
                                'gzpost' => gzdeflate(json_encode(array('action' => 'emp_admin_login', 'customer_email_address' => $p1a)), 7),
                                'flagged' => 0,
                                'attention' => '',
                                'severity' => 'info',
                                'logmessage' => 'EMP admin login',
                            );
                            zen_db_perform(TABLE_ADMIN_ACTIVITY_LOG, $sql_data_array);
                        }
                    }
                    break;
    
                default:
                    break;
            }
        }
    }
    and am having problems

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Log errors

    What is POS login and how is it expected to interact with EMP?

  8. #8
    Join Date
    Jan 2013
    Posts
    808
    Plugin Contributions
    0

    Default Re: Log errors

    it is a point of sell module, it uses masterpassword to login when guest account is checked, on a different page than the standard login Module made by zencarter

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,401
    Plugin Contributions
    87

    Default Re: Log errors

    Quote Originally Posted by jimmie View Post
    it is a point of sell module, it uses masterpassword to login when guest account is checked, on a different page than the standard login Module made by zencarter
    You'll need to contact the developer of that module for further support.

 

 

Similar Threads

  1. Replies: 17
    Last Post: 24 Aug 2014, 11:40 PM
  2. Replies: 1
    Last Post: 23 Dec 2013, 06:02 AM
  3. Missing argument
    By stagebrace in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 31 Dec 2006, 07:19 PM
  4. CyberSource payment module error: Missing argument 2 for insertsignature()
    By carlosferrandis in forum Addon Payment Modules
    Replies: 1
    Last Post: 26 Sep 2006, 01:00 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR