mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
🐛 Handle unexpected settings-values in DB
This error was not triggered in the admin UI, but was reported by running phpunit.
This commit is contained in:
parent
90f70537ba
commit
1e1acd3b54
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ abstract class AbstractDataModel {
|
||||||
*/
|
*/
|
||||||
public function load() : void {
|
public function load() : void {
|
||||||
$saved_data = get_option( static::OPTION_KEY, array() );
|
$saved_data = get_option( static::OPTION_KEY, array() );
|
||||||
$filtered_data = array_intersect_key( $saved_data, $this->data );
|
$filtered_data = array_intersect_key( (array) $saved_data, $this->data );
|
||||||
$this->data = array_merge( $this->data, $filtered_data );
|
$this->data = array_merge( $this->data, $filtered_data );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue