Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #32848, comment 15


Ignore:
Timestamp:
07/17/2024 09:52:37 PM (3 months ago)
Author:
pbearne
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32848, comment 15

    initial v1  
    44{{{#!php
    55<?php
    6         /**
    7         * @ticket 32848
    8         *
    9         * Test that $options = array('test' => null); works.
    10         */
    11         public function test_for_null() {
    12                 $option = 'foo';
    13                 $this->assertTrue( add_option( $option, null, '',true  ) );
     6/**
     7 * @ticket 32848
     8 *
     9 * Test that $options = array('test' => null); works.
     10 */
     11public function test_for_null() {
     12        $option = 'foo';
     13        $this->assertTrue( add_option( $option, null, '',true  ) );
    1414
    15                 $alloptions = wp_load_alloptions();
    16                 $this->assertFalse( isset( $alloptions[ $option ] ) );
    17                 $this->assertTrue( isset( $alloptions[ $option ] ) || array_key_exists( $option, $alloptions ) );
    18         }
     15        $alloptions = wp_load_alloptions();
     16        $this->assertFalse( isset( $alloptions[ $option ] ) );
     17        $this->assertTrue( isset( $alloptions[ $option ] ) || array_key_exists( $option, $alloptions ) );
     18  }
    1919
    2020}}}