When try to enable the Audit filter logging module on php less than 5.5 version the fatal error is appear:
"Fatal error: Can't use function return value in write context in audit_log/modules/audit_log_filter/audit_log_filter.module on line 11"

From empty() function description:
"Note:
Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false."

Here is a patch which will prevent this error.

CommentFileSizeAuthor
audit_log_filter_error.patch740 bytesdmytro-aragorn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

id.aragorn created an issue. See original summary.

joshmiller’s picture

Status: Needs review » Reviewed & tested by the community

Ha, didn't see this error until I tried to enable in on Platform.sh. Added this patch and the error is gone. It's a one-liner and no formatting issues that I can see.

Josh

  • Jelle_S committed 9ad3cf5 on 7.x-1.x authored by id.aragorn
    Issue #2545848 by id.aragorn: Fatal error when try to enable Audit...
Jelle_S’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in latest dev. Will create a new release soon. Thanks for the patch!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.