Skip to content

Commit

Permalink
fix : PHP deprecated - Automatic conversion of false to array
Browse files Browse the repository at this point in the history
  • Loading branch information
Ta5r authored and justlevine committed Sep 16, 2024
1 parent 62473b0 commit a6a3877
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/unit/BlockSupportsAnchorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ public function setUp(): void {
parent::setUp();

$settings = get_option( 'graphql_general_settings' );
if ( ! is_array( $settings ) ) {
$settings = [];
}
$settings['public_introspection_enabled'] = 'on';
update_option( 'graphql_general_settings', $settings );

Expand Down
3 changes: 3 additions & 0 deletions tests/unit/EditorBlockInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ public function setUp(): void {
parent::setUp();

$settings = get_option( 'graphql_general_settings' );
if ( ! is_array( $settings ) ) {
$settings = [];
}
$settings['public_introspection_enabled'] = 'on';
update_option( 'graphql_general_settings', $settings );
}
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/PostTypeBlockInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ public function setUp(): void {
parent::setUp();

$settings = get_option( 'graphql_general_settings' );
if ( ! is_array( $settings ) ) {
$settings = [];
}
$settings['public_introspection_enabled'] = 'on';
update_option( 'graphql_general_settings', $settings );

Expand Down
3 changes: 3 additions & 0 deletions tests/unit/RegistryTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public function setUp(): void {
parent::setUp();

$settings = get_option( 'graphql_general_settings' );
if ( ! is_array( $settings ) ) {
$settings = [];
}
$settings['public_introspection_enabled'] = 'on';
update_option( 'graphql_general_settings', $settings );

Expand Down

0 comments on commit a6a3877

Please sign in to comment.