AnsweredAssumed Answered

Logging Calls working but giving fatal error - Error Evaluating Expression

Question asked by Merrick Dennis on Jan 21, 2015
Latest reply on Jan 22, 2015 by Alex Nassi
SugarCRM 6.5.7 Pro
PHP 5.3.19

I'm running into a strange issue that seems to have just cropped up in the last several weeks.  I was looking through my log file and noticed a bunch of Fatal errors beginning to show up:

Wed Jan 21 16:53:00 2015 [2824][00540000001aS3EAAU][FATAL] Error evaluating expression: Non-static method ACLAction::getUserAccessLevel() should not be called statically, assuming $this from incompatible context
Line 302 of file /my_sugar_root/data/SugarBean.php

I found out that this occurs whenever someone saves a Call record.  Once the save button is pressed, about 10-15 of these errors are thrown in the log per user/per save but sometimes the line number of the error in SugarBean.php changes between line 302, 303 and 304.  The record is saving fine so I'm not sure what's going on here but my log files are filled up with these things.

Here's the main section of SugarBean.php that the log is showing the error in:

        // Verify that current user is not null then do an ACL check.  The current user check is to support installation.        if(!empty($current_user->id) &&
                (is_admin($current_user) ||
                ($this->bean_implements('ACL') && (ACLAction::getUserAccessLevel($current_user->id,$this->module_dir, 'access')
                == ACL_ALLOW_ENABLED && (ACLAction::getUserAccessLevel($current_user->id, $this->module_dir, 'admin')
                == ACL_ALLOW_ADMIN || ACLAction::getUserAccessLevel($current_user->id, $this->module_dir, 'admin')
                == ACL_ALLOW_ADMIN_DEV)))))

Normally I would think this is a PHP strict standards error, but the Sugar log doesn't show that.  I also took a look in my PHP error_log and nothing relating to this is showing up there.  I don't have any logic hooks running for the Calls module either.  Finally, I checked my php.ini and error_reporting is set to E_ALL & ~E_DEPRECATED (typical production values) but display_errors is off so I'm not sure why so many errors are showing up like this in the Sugar error log.

Any suggestions or ideas?  Again I can't see that anything is broken, and I'm not getting any reports from my users of issues when logging their notes/calls but I don't know what could be causing all of this.  I'm a little hesitant to edit the SugarBean file.

Thanks all!