Fix "Trying to access array offset on value of type null" (#54)

This commit is contained in:
Universal Omega 2021-09-15 20:03:00 -06:00 committed by GitHub
parent 7bc82c9a62
commit c5a8702106
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -832,7 +832,7 @@ class Parameters extends ParametersData {
*/ */
public function _titleregexp( $option ) { public function _titleregexp( $option ) {
$data = $this->getParameter( 'title' ); $data = $this->getParameter( 'title' );
if ( !is_array( $data['regexp'] ) ) { if ( !isset( $data['regexp'] ) || !is_array( $data['regexp'] ) ) {
$data['regexp'] = []; $data['regexp'] = [];
} }
$newMatches = explode( '|', str_replace( ' ', '\_', $option ) ); $newMatches = explode( '|', str_replace( ' ', '\_', $option ) );