Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On PHP 5.3, I'm getting this error on fresh install when visiting admin/config/development/less
Fatal error: Function name must be a string in /var/www/sites/all/modules/contrib/libraries/libraries.module on line 534
...
libraries_detect() /var/www/sites/all/modules/contrib/less/includes/less.admin.inc:31
Another install on PHP 5.5 works fine. Variable dump on both sites show exact same $library array values on line 534.
Comments
Comment #1
corey.aufang CreditAttribution: corey.aufang commentedThank you for finding this.
It appears that sometime after 5.3 that you can now directly invoke a static member like so:
When I had been looking through the Libraries API module source I did not pay close enough attention to the logic code that determined which method to use.
I have added an additional parameter which should cause Libraries to use call_user_func_array() instead which as of PHP 5.3 can take an array for the function name, which will then call the static member as expected.
You should see a commit for this shortly.
Comment #3
corey.aufang CreditAttribution: corey.aufang commentedComment #4
corey.aufang CreditAttribution: corey.aufang commentedI'm marking as fixed.
If you are still having this issue, please reopen the ticket.