From:             register at bazanov dot net
Operating system: Debian
PHP version:      5.3.15
Package:          Unknown/Other Function
Bug Type:         Bug
Bug description:False positive "Argument ... must be an array, null given"

Description:
------------
in php.log I see (2 times for the last month):

[20-Jul-2012 12:12:32] PHP Catchable fatal error:  Argument 2 passed to
PendingOrderService::PreparePendingOrder() must be an array, null given,
called in /srv/www/example.org/public_html/OrderHelper.php on line 478 and
defined in /srv/www/example.org/public_html/bll/PendingOrderService.php on
line 58

...
// OrderHelper.php, Line 478:
$order = PendingOrderService::PreparePendingOrder($customer, $orderLines,
$isDDP, $CustomerOrderN);
PendingOrderService::AddOrder($order, $_SESSION['RestrictWithMinPrices']);

CustomerActionsLogAccessor::AddLogEntry(
          $CustomerID, ADD_PENDING_ORDER_FROM_EXCEL, $CustomerOrderN,
count($orderLines) . " positions", '');
...

...
// PendingOrderService.php, Line 58:
public static function PreparePendingOrder(Customer $customer, array
$orderLines, $isDDP, $orderN = null)
...

At the same time in my log I see that the order was added on [20-Jul-2012
12:12:32] (same time when fatal error was logged) and the log contains "419
positions", so count($orderLines) executed successfully and it means
$orderLines was array and not null. Also I see the saved order in the
database with timestamp [20-Jul-2012 12:12:32].

So, everything went fine, $orderLines was not null, but still I got that
log entry.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=62721&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=62721&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=62721&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=62721&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=62721&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62721&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=62721&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=62721&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=62721&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=62721&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=62721&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=62721&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=62721&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=62721&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=62721&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=62721&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=62721&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=62721&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=62721&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=62721&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=62721&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=62721&r=mysqlcfg

Reply via email to