ID: 37442
User updated by: warden at warden dot cz
Reported By: warden at warden dot cz
Status: Open
Bug Type: SimpleXML related
Operating System: Gentoo Linux
PHP Version: 5.1.4
New Comment:
I forgot to write my frequency value in this example, so that file
looks like:
<conf>
<frequency>30</frequency>
</conf>
Previous Comments:
------------------------------------------------------------------------
[2006-05-14 23:11:39] warden at warden dot cz
Description:
------------
I have file conf.xml:
<conf>
<frequency></frequency>
</conf>
If I use $conf = simplxml_load_file(conf.xml) in object and than put
the value of frequency into object variable ($this->frequency =
$conf->frequency) everything is OK, but if I want to use this value in
sleep($this->frequency) function, an error is displayed:
Warning: sleep() expects parameter 1 to be long, object given in...
If I try to get variable type of frequency, "object" is returned...when
I settype($this->frequency, "integer"), everything works good...
List of compiled modules:
apache2, bzip2, cgi, cli, crypt, exif, force-cgi-redirect, ftp, gd,
iconv, imap, mhash, mysql, ncurses, nls, pcntl, pcre, posix, readline,
reflection, session, simplexml, spell, spl, ssl, truetype, xml, xpm,
xsl, zip, zlib
Expected result:
----------------
Clasic sleep(30); with no error
Actual result:
--------------
Warning: sleep() expects parameter 1 to be long, object given in...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37442&edit=1