Error mysql_escape_string() in Newspaper-Child on PHP 7.0.15

Posted in: Newspaper
Post count: 4

Hi, recently after upgrade my PHP to 7.0.15 when i want to login to my wordpress dashboard it gives me this error.

Fatal error: Uncaught Error: Call to undefined function mysql_escape_string() in /srv/users/serverpilot/apps/app-name/public/wp-content/themes/Newspaper-child/functions.php:60 Stack trace: #0 /srv/users/serverpilot/apps/app-name/public/wp-settings.php(423): include() #1 /srv/users/serverpilot/apps/app-name/public/wp-config.php(54): require_once(‘/srv/users/serv…’) #2 /srv/users/serverpilot/apps/app-name/public/wp-load.php(37): require_once(‘/srv/users/serv…’) #3 /srv/users/serverpilot/apps/app-name/public/wp-admin/admin.php(31): require_once(‘/srv/users/serv…’) #4 /srv/users/serverpilot/apps/app-name/public/wp-admin/index.php(10): require_once(‘/srv/users/serv…’) #5 {main} thrown in /srv/users/serverpilot/apps/app-name/public/wp-content/themes/Newspaper-child/functions.php on line 60

anyone had this issues ?

Post count: 22421

Hi,

Please make sure you use the latest version of the theme (7.6) and try to use an older version of php 7. We tested php 7.0 but I’m nost sure it was 7.0.15 when we tested it. Try an older 7.0

Thank you!

Post count: 4

Thanks for the reply, sadly i can’t rollback the PHP version.

What i do to fix this is by replace mysql_real_escape_string() with esc_sql() on Newspaper & Newspaper-Child function.php.

This fixed my problem, hope it help.

  • This reply was modified 9 years by waldisa.
Post count: 22421

Glad you solved it.
Have a nice day!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.