MySQL Error After WordPress Update

Posted in: Newsmag
Post count: 13

Hello,

i updated WordPress to the latest version yesterday and began receiving the following error:

Warning: mysqli_escape_string() expects exactly 2 parameters, 1 given in /srv/users/serverpilot/apps/lavasea/public/wp-content/themes/Newsmag/functions.php on line 3

A few weeks ago, I had to add the code:

function mysql_escape_string($string){return mysqli_escape_string($string);}

to my theme because the entire site was down. I searched for a solution, and found that line of code, and it worked until yesterday.

I do not know much about PHP or MySQL. The theme is the current version, running 3.3.1 and WP version 4.7.3. I run three sites with this theme and this is the only one that has this error after the update.

Thanks
Daniel

  • This topic was modified 9 years by shorebeat.
Post count: 13

Copy of my functions.php file: http://pastebin.com/wn9KYYJm

  • This reply was modified 9 years by shorebeat.
  • This reply was modified 9 years by shorebeat.
Post count: 13

Also, if I remove

function mysql_escape_string($string){return mysqli_escape_string($string);}

my entire site goes down.

Post count: 23312

Hello shorebeat,

I recommend you doing a new fresh install from scratch via FTP way because this is the surest method in this regard. After this, you should install only the plugins that come bundled with the theme packet and rule out any conflicting plugins which can appear when you use some untested plugins. Clear all your caches, purge CDN files and check the results. Notice that until now, we do not have any bad reports in this regard, sorry! Try the above advice and let us know how it goes!

Thanks for your understanding!

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