Skip to content

Commit 4bd3ca1

Browse files
Merge pull request #1057 from Codeinwp/copilot/fix-php-8-compatibility-error
Fix PHP 8+ TypeError when service_data is a non-array value in localize_dashboard_app
2 parents 19b03ab + b18eff5 commit 4bd3ca1

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

inc/admin.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,9 @@ private function localize_dashboard_app() {
14151415
}
14161416
$api_key = $this->settings->get( 'api_key' );
14171417
$service_data = $this->settings->get( 'service_data' );
1418+
if ( ! is_array( $service_data ) ) {
1419+
$service_data = [];
1420+
}
14181421
$user = get_userdata( get_current_user_id() );
14191422
$user_status = 'inactive';
14201423
$auto_connect = get_option( Optml_Settings::OPTML_USER_EMAIL, 'no' );

playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ import { defineConfig } from '@playwright/test';
22

33
export default defineConfig({
44
testDir: './tests/e2e',
5-
timeout: 30000,
5+
timeout: 60000,
66
workers: process.env.CI ? 2 : 5,
77
retries: process.env.CI ? 2 : 0,
88
use: {
99
baseURL: 'http://testing.optimole.com', // Replace with your local WordPress URL
1010
trace: 'on-first-retry',
11+
navigationTimeout: 45000,
1112
},
1213
projects: [
1314
{

0 commit comments

Comments
 (0)