Closed wendao76 closed 5 years ago
What's database and version you are using that returned $result = 1
as integer type?
I have this problem,too.
Use mysql5.7 and medoo 1.5.4
And I setting this ,the 'has' can work well:
'option' => [ PDO::ATTR_STRINGIFY_FETCHES => true]
Convert numeric values to strings when fetching. Requires bool.
I think this is a bug because of comparing with the strict type. ''' return intval($result) === 1 || $result === true; ''' well ?
@wendao76 @catfan @ha-ni-cc yes, it's a bug. now,just use "PDO::ATTR_EMULATE_PREPARES => true" to solve this.
This has been fixed on a951846f9bfe93419d40700d9fbefde5c9b10259.
''' return $result === '1' || $result === true; ''' in fact, $result=1, so the method always return false