Bug #55836 [Opn->Fbk]: main()-warning

From: Date: Mon, 25 Jul 2016 10:21:19 +0000
Subject: Bug #55836 [Opn->Fbk]: main()-warning
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202569@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55836&edit=1 ID: 55836 Updated by: cmb@php.net Reported by: keyboard27 dot 10 at gmail dot com Summary: main()-warning -Status: Open +Status: Feedback Type: Bug -Package: Unknown/Other Function +Package: SimpleXML related Operating System: Windows 7 PHP Version: 5.3.1 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Does this issue still persist with currently supported PHP versions? If so, please reopen, and provide a self-contained reproduce script. If you can't minimize the reproduce script, please make it available for download. Previous Comments: ------------------------------------------------------------------------ [2011-11-26 11:16:13] keyboard27 dot 10 at gmail dot com <?php //$Verse_ID = 22 (retrieved from database) //$Chap_ID = 1 (retrieved from database) //$Book_ID = 2 (retrieved from database) //$Chap = XML Node //$Chap->Verse = xml node array(size: 22) //$Book = xml node array(size: 66) //$book[($book_id-1)] = xml node array(size: 40) //$xml_books = xml node //$xml_books->book = xml node array(size:66) if((int)$Verse_ID >= sizeof($Chap->Verse)) { if((int)$Chap_ID >= sizeof($Book[($Book_ID-1)])) { if((int)$Book_ID == sizeof($xml_Books->Book)) { $Book_ID = 1; $Chap_ID = 1; $Verse_ID = 1; } else { $Book_ID++; $Chap_ID = 1; $Verse_ID = 1; } } else { $Chap_ID++; $Verse_ID = 1; } } else { $Verse_ID++; } ?> ------------------------------------------------------------------------ [2011-10-03 14:16:40] keyboard27 dot 10 at gmail dot com is it oke if i would send you the files? the one is the xml-file which the other file reads and partly displays it is in dutch, but that shouldn't be a problem the $Boek_ID var has the value 2, $Hfst_ID is 1 and $Vers_ID is 22, which is Exodus(book #2) 1:22 ------------------------------------------------------------------------ [2011-10-03 14:10:15] pajoye@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2011-10-03 13:47:56] keyboard27 dot 10 at gmail dot com the actual warning comes from the following line: "if((int)$Chap_ID >= sizeof($Book[($Book_ID-1)]))" ------------------------------------------------------------------------ [2011-10-03 13:45:26] keyboard27 dot 10 at gmail dot com Sorry for the double code... ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=55836 -- Edit this bug report at https://bugs.php.net/bug.php?id=55836&edit=1

« previous php.bugs (#202569) next »