0

I'm getting an error and I don't know how to resolve it..

The error is:

Parse error: syntax error, unexpected 'addslashes_strings_only' (T_STRING), expecting '{' in /home/blokhuisocca/domains/blokhuisoccasions.nl/public_html/wp-includes/deprecated.php on line 4135

Line 4135 is:

function ()addslashes_strings_only( $value ) {
    return is_string( $value ) ? addslashes( $value ) : $value;
}

How to fix?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
tvd96
  • 1

1 Answers1

-1

I think you have a typo problem, the php functions are sth like this:

function functionName() {
  code to be executed;
}

So you should change your code like this

function addslashes_strings_only( $value ) {
    return is_string( $value ) ? addslashes( $value ) : $value;
}
azibom
  • 1,769
  • 1
  • 7
  • 21
  • 1
    "Try this" does not make for a good answer. You should explain *how* and *why* this solves their problem. I recommend reading, "[How do I write a good answer?"](//stackoverflow.com/help/how-to-answer) – John Conde Dec 28 '20 at 14:53
  • Please don't answer questions where the solution is "Fix the typo". This type of question has no long term value since other people with the same problem are not going to find this by searching. "Typo" is one of the standard Close Vote reasons. Answering this type of question can block the OP from deleting it to remove bloat from StackOverflow. – John Conde Dec 28 '20 at 14:53
  • You are right @JohnConde, I updated my answer, thanks – azibom Dec 28 '20 at 14:58