Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

fix:Compatiblity for PHP7.3 #1282

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

shisiying
Copy link

No description provided.

@shisiying
Copy link
Author

shisiying commented Jul 22, 2019

Both of these changes are based on errors in the php7.3 production environment

  • empty

if $searchKey == NULL,It also executes the following code.But it shouldn't have been.

  • strstr

Compatiblity for PHP7.3

If needle is not a string, it is converted to an integer and applied as the ordinal value of a character. This behavior is deprecated as of PHP 7.3.0, and relying on it is highly discouraged. Depending on the intended behavior, the needle should either be explicitly cast to string, or an explicit call to chr() should be performed.

@stafot
Copy link

stafot commented Sep 11, 2019

Any ideas in which release this is going to be merged?

@antoinegomez
Copy link

I also have this issue.
Is this the official PHP Paypal SDK ?

Are we only a few people having the issue ?

@stafot
Copy link

stafot commented Sep 12, 2019

There is a workaround through ignoring E_DEPRECATED on your php.ini or in your app @antoinegomez. Bur it should be fixed because in next php versions it will break.

@antoinegomez
Copy link

There is a workaround through ignoring E_DEPRECATED on your php.ini or in your app @antoinegomez. Bur it should be fixed because in next php versions it will break.

Yes this is what I ended up doing. But I do not understand why this fix is still pending. It is not like PHP and PayPal were small players ...

@tomfotherby
Copy link

It'd be great to have this merged.

We have upgraded to PHP 7.3 but this Paypal SDK issue is forcing us to write code like this for our test system:

    // Configure app to be "vocal" when in debug mode
    if (date('Y-m-d') < '2019-12-01') {
        // During the PHP upgrade from 7.2 to 7.3 we are having some DEPRECATION errors with external dependencies
        // Example: https://github.com/paypal/PayPal-PHP-SDK/pull/1282
        // Give us some time for these deprecations to be fixed without making Staging unusable for developers
        ini_set('error_reporting', E_ALL ^ E_DEPRECATED);
    } else {
        ini_set('error_reporting', E_ALL); // Use strict error reporting when in debug mode. (E_ALL includes E_STRICT as of PHP 5.4.0)
    }

@waynehaffenden
Copy link

This is seriously a pain and looking like they're not going to merge in this fix :/

@tomfotherby
Copy link

tomfotherby commented Mar 23, 2020

I agree. We had to fork the repo and pull in the fixes. I'd prefer to use the official paypal repo if we could.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants