A
A
Alexander2020-04-17 16:22:29
PHP
Alexander, 2020-04-17 16:22:29

How to fix the error without changing php versions?

As far as I understood it could be related to php version 7.4? I have 7.4.2

On all pages of the site on WordPress error:

Deprecated: Array and string offset access syntax with curly braces is deprecated in /wp-content/plugins/clearfy/components/minify-and-combine/includes/classes/class -helper.php on line 205

/**
   * Returns true if given $url is protocol-relative.
   *
   * @param string $url   URL to check.
   *
   * @return bool
   */
  public static function isProtocolRelative( $url ) {
    return ( '/' === $url{1} ); // second char is `/`.
  }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-08-05
@8Alfa

Try to fix the line - like this:
return ( '/' === $url[1] ); // second char is `/`.
Remove curly braces when accessing the element.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question