Bug #62721 [Opn->Fbk]: False positive "Argument ... must be an array, null given"
| From: | aharvey@php.net | Date: | Thu, 02 Aug 2012 01:15:43 +0000 |
| Subject: | Bug #62721 [Opn->Fbk]: False positive "Argument ... must be an array, null given" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-172378@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=62721&edit=1
ID: 62721
Updated by: aharvey@php.net
Reported by: register at bazanov dot net
Summary: False positive "Argument ... must be an array, null
given"
-Status: Open
+Status: Feedback
Type: Bug
-Package: Unknown/Other Function
+Package: Scripting Engine problem
Operating System: Debian
PHP Version: 5.3.15
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2012-08-01 20:33:48] register at bazanov dot net
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 this bug report at https://bugs.php.net/bug.php?id=62721&edit=1