My apologies if this is a problem.
The following code (part of a larger program) keeps generating some werid core.454343 (random numbers) in my root.
Code: Select all
<div class='title'>Unpaid Invoices</div>
<?php
$oi['id'] = 15;
$i = new invoice();
$i->loadInvoice($oi);
?>
Code: Select all
public function loadInvoice($params)
{
$tmp = array();
if(array_key_exists('invoice_id', $params))
{
$tmp = $this->switchId($params);
$params = $tmp;
} else {
$tmp = $params;
$params = null;
$params['id'] = $tmp['id'];
}
$sql = "SELECT id, client_id, workorder_id, DATE_FORMAT(date_issued, '%d-%m-%y') AS date_issued, DATE_FORMAT(date_paid, '%d-%m-%y') AS date_paid, DATE_FORMAT(date_sent, '%d-%m-%y') AS date_sent, invoice_number FROM invoice WHERE id=:id";
$result = databaseHandler::getRow($sql, $params);
foreach($result as $key=>$string)
{
$this->invoice_details[$key] = $string;
}
$this->invoice_id_primary['id'] = $result['id'];
$this->invoice_id_secondary['invoice_id'] = $result['id'];
}
For the record this also happens when I instantiate a new client object from my cleint class. It is pretty much the same as the example above so I won't include that.
Thanks