Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Security / PHP 7.2 compatibility: create_function() is deprecated #22

Open
jameswilson opened this issue Aug 28, 2018 · 1 comment
Open

Comments

@jameswilson
Copy link

The function create_function() has been deprecated in PHP 7.2 due to security issues.

The following PHP warning is displayed when viewing a detail record page:

Deprecated function: Function create_function() is deprecated in auto_link() (line 1515 of modules/contrib/edsapi-drupal8-plugin/ebsco.module).
auto_link('XXXXXXXXXXXX') (Line: 1254)
template_preprocess_ebsco_result(Array, 'ebsco_result', Array) (Line: 284)
...

The suggested fix is to replace this:

https://github.com/ebsco/edsapi-drupal8-plugin/blob/f6c435f262c1d8ee0d9777b2591803139e99087b/ebsco.module#L1513-L1520

With an anonymous function. Code example with preg_replace_callback here

@abbydrury
Copy link

This still appears in the 8.x and 9.x branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants