I’m integrating PayPal in an application written in PHP and running on PHP 5.3.1 (using Zend Engine 2.3.0).
Every time I require a PayPal SDK file or use any of the methods it prints out an enormous amount of error and warning messages.
I obviously want to keep error message reporting at the maximum level possible (at least for my code).
My problem is similar to this one (I didn’t write that) https://www.x.com/message/167121#167121
I’m concerned with possible security issues and with the obvious annoying amount of messages going into the log.
Do you have any idea of how to fix/work around this?
Thanks 🙂
EDIT:
A sample from the warning list (there are more):
As an example (but there are more):
Strict Standards: Assigning the return
value of new by reference is
deprecated in (…)/PayPal.php on line
87Strict Standards: Assigning the return
value of new by reference is
deprecated in (…)/PayPal.php on line
115Strict Standards: Declaration of
PayPal::raiseError() should be
compatible with that of
PEAR::raiseError() in (…)/PayPal.php
on line 198Strict Standards: Assigning the return
value of new by reference is
deprecated in (…)/PayPal/Hack.php on
line 78Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Value.php on line 90Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Value.php on line 93Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line 221Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line 514Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line 616Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line 617Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line 760Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line 897Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line
1055Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line
1083Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line
1109Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line
1151Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/SOAP/Base.php on line
1176Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/Type/XSDType.php on line
97Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/Type/XSDType.php on line
110Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/Type/XSDType.php on line
112Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/Profile/Handler/Array.php
on line 53Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/Profile/API.php on line
256Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/Type/XSDSimpleType.php on
line 69Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/Type/XSDSimpleType.php on
line 71Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/Type/XSDSimpleType.php on
line 98Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/Type/XSDSimpleType.php on
line 111Strict Standards: Assigning the return
value of new by reference is
deprecated in
(…)/PayPal/Type/XSDSimpleType.php on
line 113
I assume that PayPal Code is an external library from the PEAR Package your using that isn’t 5.3 Strict comparable. There quite some Code that suffers from that Problem.
Assuming you don’t want to change that Code and Submit it back ( 😉 ) there aren’t so many things you can do.
To name the first two that come to mind:
In your wrapper Code for the Paypal access turn of E_STRICT everytime before the call and back on after.
E.g.
doesn’t look really pretty and requires a good amount of code.
If your are already using a custom errorhandler in your project you could extend that to filter out all errors of that lib.
E.g.
Hope that helps