Skip to content

Commit

Permalink
Fix PHP 7.4 bug in PPXmlMessage
Browse files Browse the repository at this point in the history
* ErrorException: Cannot use "parent" when current class scope has no parent
  vendor/paypal/sdk-core-php/lib/PayPal/Core/PPXmlMessage.php:124

  As class has no parent, changed to self instead.

* Update travis config with new php versions
  • Loading branch information
slt committed Nov 3, 2019
1 parent 21d5159 commit 3954bb1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ matrix:
include:
- php: 5.3
dist: precise
- php: 5.4
dist: trusty
- php: 5.5
dist: trusty

php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4snapshot

install:
- composer install
Expand Down
2 changes: 1 addition & 1 deletion lib/PayPal/Core/PPXmlFaultMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function init(array $data = array())
}

if (($first = reset($map)) && !is_array($first) && !is_numeric(key($map))) {
parent::init($map, false);
self::init($map);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/PayPal/Core/PPXmlMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function init(array $map = array(), $isRoot = true)
}

if (($first = reset($map)) && !is_array($first) && !is_numeric(key($map))) {
parent::init($map, false);
self::init($map, false);
return;
}

Expand Down

0 comments on commit 3954bb1

Please sign in to comment.