pg_fetch_object does not convert to literal PHP booleans |
|
| BugsAlert Home > pg_fetch_object does not convert to literal PHP booleans | |
|
Description: ------------ Postgresql booleans are internally stored as either 'f' or 't' (False or True). On retrieval using pg_fetch_object, they are simply retrieved as PHP strings, rather than either 0 or 1, or even better, false or true. This causes that postgresql. I am not sure, but I think in the data returned by the server, there is metadata explaining the field types and so they could be automatically converted to PHP bools. This is from a bugreport and related forum topic that was made for the CodeIgniter framework. Bugreport (slighly unrelated CI bug, but this issue was discussed in the comments): http://codeigniter.com/bug_tracker/bug/6303/ Forum topic: http://codeigniter.com/forums/viewthread/101001/ Reproduce code: --------------- test."\n"; pg_query('DROP TABLE test'); ?> Expected result: ---------------- 1 Actual result: -------------- t Original Source: http://bugs.php.net/47051 Learn more about pg_fetch_object does not convert to literal PHP booleans |
|
| Tags: fetch object convert literal php booleans | |
Related Items |
|
|
Vuln: H2O-CMS PHP Code Injection and Cookie Authentication Bypass Vulnerabilities
|
|
|
VUPEN - Ubuntu Security Update Fixes Pidgin Buffer Overflow and DoS Issues
|
|
|
Bug in recursive regex processing
|
|
|
Microsoft Security Bulletin Summary for October 2007
|
|
|
Brief: Apple patches Safari, DNS software
|
|
|
Meeting Notes from the Mozilla community: Mozilla Platform Meeting Minutes: 2009-09-08
|
|
|
Vuln: FreeType TT_Load_Simple_Glyph() TTF File Integer Overflow Vulnerability
|
|