tombenner / wp-mvc

An MVC framework for WordPress
http://wpmvc.org
MIT License
624 stars 172 forks source link

Wrong property name #247

Closed akamadr closed 4 years ago

akamadr commented 5 years ago

Wrong property name when setting $default['selects'] value.

cyberscribe commented 4 years ago

Can you explain more about how to reproduce a problem caused by the original code, and what htis fixes?

akamadr commented 4 years ago

In line 38 we're checking if property $this->selects is empty, so it should be either:

'selects' => empty($this->selects) ? array(''.$this->name.'.*') : $this->selects,

or

'selects' => empty($this->default_selects) ? array(''.$this->name.'.*') : $this->default_selects,

Original code causes error when property $selects is declared but $default_selects isn't.

cyberscribe commented 4 years ago

Thanks!