Making WordPress.org

Changeset 10294


Ignore:
Timestamp:
09/29/2020 01:39:16 AM (4 years ago)
Author:
dd32
Message:

Theme Directory: API: Avoid a PHP Notice by performing the ?? operation before casting it to an array.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php

    r10243 r10294  
    430430        }
    431431
    432         $this->request->fields = (array) $this->request->fields ?? [];
     432        $this->request->fields = (array) ( $this->request->fields ?? [] );
    433433
    434434        $this->fields = array_merge( $this->fields, $defaults, (array) $this->request->fields );
     
    495495        }
    496496
    497         $this->request->fields = (array) $this->request->fields ?? [];
     497        $this->request->fields = (array) ( $this->request->fields ?? [] );
    498498
    499499        $this->fields = array_merge( $this->fields, $defaults, $this->request->fields );
Note: See TracChangeset for help on using the changeset viewer.