Zdenko Posted February 2, 2023 Share Posted February 2, 2023 (edited) PHP fatal error, can someone help me with this PHP problem, Fatal error: Array and string offset access syntax with curly braces is no longer supported on line 2361, this is that line $this->response->headers['hash'] = $value{0} == '"' ? substr($value, 1, -1) : $value; Edited February 2, 2023 by Zdenko Quote Link to comment https://forums.phpfreaks.com/topic/315870-zdenko/ Share on other sites More sharing options...
ginerjm Posted February 2, 2023 Share Posted February 2, 2023 I hate them. Did you have something else to say? Quote Link to comment https://forums.phpfreaks.com/topic/315870-zdenko/#findComment-1605295 Share on other sites More sharing options...
Zdenko Posted February 2, 2023 Author Share Posted February 2, 2023 Hi, when i try to enter CodeGuard plugin on my website WP i get this error: Fatal error: Array and string offset access syntax with curly braces is no longer supported on line 2361, this is that line $this->response->headers['hash'] = $value{0} == '"' ? substr($value, 1, -1) : $value; Quote Link to comment https://forums.phpfreaks.com/topic/315870-zdenko/#findComment-1605296 Share on other sites More sharing options...
ginerjm Posted February 2, 2023 Share Posted February 2, 2023 If ($value{0} is supposed to be an array reference you are doing it wrong. Correct array references use square brackets, not braces Quote Link to comment https://forums.phpfreaks.com/topic/315870-zdenko/#findComment-1605299 Share on other sites More sharing options...
Zdenko Posted February 2, 2023 Author Share Posted February 2, 2023 thanks ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/315870-zdenko/#findComment-1605300 Share on other sites More sharing options...
Zdenko Posted February 2, 2023 Author Share Posted February 2, 2023 when I correct to square brackets, second error is listed: S3Request::__responseWriteCallback(): Argument #2 ($data) must be passed by reference, value given on line 2245, this is the line: if (curl_exec($curl)) Quote Link to comment https://forums.phpfreaks.com/topic/315870-zdenko/#findComment-1605303 Share on other sites More sharing options...
requinix Posted February 2, 2023 Share Posted February 2, 2023 There is no "$data" being used in "if (curl_exec($curl))". Take another look. Are you trying to edit someone's WP plugin? Have you checked for a more recent version of it? Quote Link to comment https://forums.phpfreaks.com/topic/315870-zdenko/#findComment-1605305 Share on other sites More sharing options...
Zdenko Posted February 2, 2023 Author Share Posted February 2, 2023 (edited) hi requinix, there is no new version of the plugin, and support did not reply to my email, so i guess it's my struggle, when I correct to square brackets, plugin is on, but with another warning Edited February 2, 2023 by Zdenko Quote Link to comment https://forums.phpfreaks.com/topic/315870-zdenko/#findComment-1605308 Share on other sites More sharing options...
ginerjm Posted February 2, 2023 Share Posted February 2, 2023 Show us the code please and point out the exact line that is giving you the error Quote Link to comment https://forums.phpfreaks.com/topic/315870-zdenko/#findComment-1605331 Share on other sites More sharing options...
maxxd Posted February 3, 2023 Share Posted February 3, 2023 What's the plugin? If it's dead there's probably an alternative that does a similar thing or a reason it's no longer supported. Quote Link to comment https://forums.phpfreaks.com/topic/315870-zdenko/#findComment-1605334 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.