Skip to content

Commit 87ea814

Browse files
bastienhoeileenmcnaughton
authored andcommitted
Factorize *unserialize functions
1 parent 720e235 commit 87ea814

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

CRM/Core/Payment/OmnipayMultiProcessor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ public function serialize(): string {
114114
*/
115115
public function unserialize($data) {
116116
$values = unserialize($data);
117-
foreach ($values as $key => $value) {
118-
$this->$key = $value;
119-
}
117+
$this->__unserialize($values);
120118
}
121119

122120
/**
123121
* For PHP8.1
124122
* https://www.php.net/manual/en/language.oop5.magic.php#object.unserialize
123+
*
124+
* @param array $data
125125
*/
126126
public function __unserialize(array $data): void {
127127
foreach ($data as $key => $value) {

0 commit comments

Comments
 (0)