ID:               29022
 Updated by:       [EMAIL PROTECTED]
 Reported By:      johfivealive at hotmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Zend Engine 2 problem
 Operating System: Fedora Core 2
 PHP Version:      5.0.0RC3
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is correct behavior.


Previous Comments:
------------------------------------------------------------------------

[2004-07-05 20:18:10] johfivealive at hotmail dot com

Description:
------------
using the define() function I get a warning when I don't think I
should.

Reproduce code:
---------------
define( "LOGIK_MYSQL_HOST", $config->getMySQLHost() );

where $config->getMySQLHost() returns a string.

The following code makes the warning go away:

define( "LOGIK_MYSQL_HOST", (string) $config->getMySQLHost() );

Expected result:
----------------
define( "LOGIK_MYSQL_HOST", $config->getMySQLHost() );

should not produce a warning

Actual result:
--------------
define( "LOGIK_MYSQL_HOST", $config->getMySQLHost() );

produces the following warning:

"Warning: Constants may only evaluate to scalar values"

even though $config->getMySQLHost() returns a scalar, have to cast to
string in order to make the warning go away


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29022&edit=1

Reply via email to