Projects ⇒ Bugs ⇒ #445: Implicit conversion to boolean from integer via ! operation in messages admin ⇒ CPG Dragonfly™ CMS
Bug #445 Implicit conversion to boolean from integer via ! operation in messages admin
Project: Dragonfly 9.0.3 -> 9.3 Category: *CPG Core Issues
Submitted: Thursday, April 14, 2005 (16:04:07) Modified: Friday, April 15, 2005 (20:37:44)
Status: Closed Assigned to:
PHP Version: 4.3.10 HTTPD Server: Apache 2.0

View/Vote Add Comment

by: Brennor
Description:
------------
Postgres Integration:

When changing the active state of a message in the admin section of the site, the code uses the ! operator to invert the case. This changes the value from an integer to a boolean.

PostgreSQL barfs when trying to insert a boolean into an integer field. I don't know why MySQL doesn't.

Fix is to explicitly cast the value back to an integer after using the ! operator.


html/admin/modules/messages.php (rev 9.5) change line 28 to:
$status = intval(!$status);
by: Trevor
This bug has been fixed in the CVS.

Snapshots of the sources are packaged every 6 hours; this change
will be in the next snapshot. You can grab the snapshot at the
Downloads section.

Thank you for the report, and for helping us to make CPG-Nuke 9.0.3 -> 9.1 better.
User Info

Welcome Anonymous



(Register)
Community

Support for DragonflyCMS in a other languages:

Deutsch
Español