LSformElement :: select_box : fix isValidValue() method in inherited context

This commit is contained in:
Benjamin Renard 2017-06-27 15:12:29 +02:00
parent 5d7264fda8
commit aacfe2d6e0

View file

@ -73,7 +73,7 @@ class LSformElement_select extends LSformElement {
*/
public function isValidValue($value,$possible_values=False) {
if (!is_array($possible_values)) {
if (isset($this) && get_class($this) == __CLASS__ && is_array($this -> params['text_possible_values'])) {
if (isset($this) && is_a($this, __CLASS__) && is_array($this -> params['text_possible_values'])) {
$possible_values=$this -> params['text_possible_values'];
}
else {