Jump to content
thirty bees forum

Missing error message


musicmaster

Recommended Posts

I made a modification in a query in classes/order/orderInvoice.php. I made some mistake in the process. The result was no error message (despite dev mode on). Instead I got a white page when I tried to generate an invoice or a delivery slip.

Predictably it took me much longer to find out what caused this bug then would have happened if there had been an error message. So my questions are: why does this happen? And can this be fixed?

BTW. What I did was that I replaced the function getProductsDetail() with the following:

public function getProductsDetail() { return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS( (new DbQuery()) ->select('od.*,p.*,ps.*,m.name AS manufacturer') ->from('order_detail', 'od') ->leftJoin('product', 'p', 'p.`id_product` = od.`product_id`') ->leftJoin('product_shop', 'ps', 'ps.id_product = p.id_product AND ps.id_shop = od.id_shop') ->leftJoin('manufacturer', 'm', p.'id_manufacturer` = m.`id_manufacturer`') ->where('od.`id_order` = '.(int) $this->id_order) ->where($this->id && $this->number ? 'od.`id_order_invoice` = '.(int) $this->id : '') ->orderBy('od.`product_name`') ); }

So I added a line for the manufacturer but in that line I put the quotes wrong.

Link to comment
Share on other sites

Blank page means some fundamental problem, like a syntax error. With code not even being executable, it can hardly send a meaningful error message to the browser.

But Apache/Nginx/PHP-FPM have error logs. Usually somewhere in /var/log. There should be a good hint on what's going on.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...