[ZBX-985] Dbexecute on pgsql return integer which may not work with binary AND Created: 2009 Jul 11 Updated: 2017 May 30 Resolved: 2009 Sep 30 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 1.6 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Johan Fischer | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
using zabbix 1.6.5, issue present in branches/1.6 and trunk. |
Description |
Use case was to simply create a user-group which failed. $result&=change_group_status($usrgrpid,$users_status); $result&=change_group_gui_access($usrgrpid,$gui_access); if(!$result) return $result; in frontends/php/include/users.inc.php. The reason is because pg_query in db.inc.php will return a resource ID (integer ?) which may return false on a binary AND. In my case, the previous value of $result was resource 127 and the return of change_group_status() was 128. Doing a binary AND between 127 and 128 returned false. In my case, I patched the file users.inc.php, but you may just want to patch DBexecute to force it to return a boolean true/false. |
Comments |
Comment by Artem Suharev (Inactive) [ 2009 Sep 30 ] |
Will be fixed in ZBX 1.6.7 and ZBX 1.8 |
Comment by richlv [ 2009 Nov 10 ] |
close old, resolved issues |