Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Help on depreciated statement.

Help on depreciated statement.

Help on depreciated statement.

Anyone know how to resolve this error?


$galleryID = preg_replace("/[^0-9]/","",$attr['ids']) 

I get this error.

Deprecated: Function create_function() is deprecated in /xxxx/wp-content/themes/hively/library/WPPostScript/Content/MediaGallery.php on line 28


RE: Help on depreciated statement.

Another example:


echo '<a href="tel:' . preg_replace("/[^0-9]/","",$organization->properties["contact"]["phone"]) . '">' . $organization->properties["contact"]["phone"] . '</a>'; 


RE: Help on depreciated statement.


In addition to spamjim's suggestions, there is a dirty one : exclude E_DEPRECATED from error_reporting.

CODE --> command line

bash-5.0$ php7.1 -d error_reporting='E_ALL' -r 'var_dump(create_function("",""));'
string(9) "\000lambda_1"

bash-5.0$ php7.2 -d error_reporting='E_ALL' -r 'var_dump(create_function("",""));'
PHP Deprecated:  Function create_function() is deprecated in Command line code on line 1
PHP Stack trace:
PHP   1. {main}() Command line code:0
string(9) "\000lambda_1"

bash-5.0$ php7.2 -d error_reporting='E_ALL & ~E_DEPRECATED' -r 'var_dump(create_function("",""));'
string(9) "\000lambda_1" 


RE: Help on depreciated statement.

Thanks to you both. Not a fan of downgrading so I guess clean it up or ignore the error. I inherited this 6 year old website. Looks like the theme needs an overhaul.


RE: Help on depreciated statement.

Being WordPress, you might simply resolve it by updating the core and the plugins.

RE: Help on depreciated statement.

Seems to be theme related. All plugins and WP core are up-to-date. The theme is littered with depreciated PHP. It is a custom theme someone write I assume... sad


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close