Number Value set to 0 doesn't pass the isEmpty test?


#1

I do this $page->number()-isNotEmpty()

but when the value is set to zero it acts as if it’s empty which it’s not. How can I fix this?

Thanks


#2

“0” is regarded as empty() in PHP: http://php.net/manual/de/function.empty.php

You can do this instead:

    if($page->number() != '') {
      echo "not empty";
    }