ID: 43599 Updated by: [EMAIL PROTECTED] Reported By: ricardo dot saracino at seivu dot ca -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.2.5 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2007-12-14 19:33:54] ricardo dot saracino at seivu dot ca Description: ------------ Last element or $data refers to the first $prod from the Product loop, memory reference problem just thought Id make you aware of it because I have been staring at my code for 30 min. Reproduce code: --------------- foreach( $data as &$group ) { foreach( $group as $prodId=>&$prod ) { if( !isset( $prod['Usage'] ) ) $prod['Usage'] = 0; if( !isset( $prod['Owned'] ) ) $prod['Owned'] = 0; $prod['Diff'] = $prod['Usage'] - $prod['Owned']; $heading[$prodId] = ''; } } foreach( Product::FindByCd( "Product", array_keys($heading) ) as $prod ) $heading[$prod->ProductID] = $prod->ProductName; Expected result: ---------------- [148] => Array ( [Owned] => 6 [Usage] => 4 [Diff] => -2 ) [102] => Array ( [Owned] => 5 [Usage] => 3 [Diff] => -2 ) [126] => Array ( [Usage] => 1 [Owned] => 0 [Diff] => 1 ) ) Actual result: -------------- [148] => Array ( [Owned] => 6 [Usage] => 4 [Diff] => -2 ) [102] => Array ( [Owned] => 5 [Usage] => 3 [Diff] => -2 ) [126] => Product Object ( [ProductID] => 148 [CallTypeID] => 1 [ProductSaleTypeID] => [ProductName] => 9242 [ProductDscrpn] => DUAL TUNER HD PVR [BEVArticleNo] => 64300 [R00ReqdIndcr] => 1 [ProductValue] => 0.00 [ProductActiveIndcr] => 1 [DDPriority] => 1 [SubArticleNo] => [CurrentInventoryIndcr] => 1 [TunerNo] => 2 [HDIndcr] => 0 [DishIncludedIndcr] => 0 [Duration] => [RuleName] => 9200 [InstallerVuPriority] => ) ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43599&edit=1
