PHP 7.4

Passing the $glue and $pieces parameters in reverse order to join has been deprecated since PHP 7.4

Curly brace syntax for accessing array elements and string offsets has been deprecated in PHP 7.4

PHP 8

PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /sites/all/modules/contrib/oauth/lib/OAuth.php on line 114

CommentFileSizeAuthor
oauth-php-7.4.patch1.12 KBjacob.embree

Comments

jacob.embree created an issue. See original summary.

hargobind’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me, and works well on my site when using PHP 7.4.

One trivial suggestion would be to replace join() with implode() since join() is just an alias of implode(). This would not result in any actual runtime difference, it's purely aesthetical.

jacob.embree’s picture

I thought that would be outside the scope of the PHP 7.4 compatibility issue and has the chance of causing a committer to balk.

hargobind’s picture

Makes sense. Whoever commits it can make the call themselves.

Thanks again for the patch!

wylbur’s picture

Also confirming this patch cleared out our php 7.4 errors:
```
Deprecated: Array and string offset access syntax with curly braces is deprecated in modules/contrib/oauth/lib/OAuth.php on line 114
```

fenstrat’s picture

+1 to RTBC.

tenamurphy’s picture

+1 to RTBC

Anonymous’s picture

Another +1 for RTBC

mr.york’s picture

+1 RTBC

caesius’s picture

+1 RTBC, also fixes fatal errors on PHP 8.0.

poker10’s picture

Title: PHP 7.4 compatibility » PHP 7.4 and PHP 8 compatibility
Issue summary: View changes
Issue tags: +PHP 8.1
ron collins’s picture

Works for 8.1 as well.

jeebsuk’s picture

+1 for it resolving issues on PHP 8.1