I have a field in the database that is tinyint.
Here is the part of the person responsible for this getter:
private $showamounts = 1;
public function getShowamounts()
{
return $this->showamounts;
}
And if showamounts = 0, then
echo $o->getShowamounts(); // returns "" instead of "0"
When I run getter for int, it works, but I am 100% sure that when I wrote the code (a few months ago), everything worked fine. So my question is: what happened? Maybe because of this, var is in the entity that he defined as logical? I just want to save 0 or 1.
source
share