Confirming Supplier Order (object from empty value)

Hi!

I’m using Dolibarr 3.7 and get a warning after every confirming of a supplier order.

[b]Warning: Creating default object from empty value in /…/htdocs/core/class/commonobject.class.php on line 3295

Warning: Cannot modify header information - headers already sent by (output started at /…/htdocs/core/class/commonobject.class.php:3295) in /…/htdocs/fourn/commande/card.php on line 618[/b]

However the order is confirmed after returning into Dolibarr. Does anyone have a fix for that warning?

I tried to commend line 3295 in /…/htdocs/core/class/commonobject.class.php on line 3295 out:

# $outputlangs->charset_output=$sav_charset_output;

and it seems to work well without that line. But I don’t have any clue if it affects other functions…

One more thing… I just saw that there is something wrong in the “Followup”/History of this orders:

dolibarr-bug.jpg
The time for “Order sent - Standby reception” always is 00:00 (with 24h-format) or 12:00AM

Same for me on 3.7.0. And if you receive the order it’s also 00:00/12:00.

I had problem like this and I fix it by downgrading php version to 5.3

For more information :

www.dolibarr.org/t/error-message-when-i-click-in-accept-order/11993/1

Downgrading is not really an option for me :-/
Everything seems to work fine with ignoring line 3295 in /htdocs/core/class/commonobject.class.php so far.

I had to fix line 3295 in /…/htdocs/core/class/commonobject.class.php again after upgrading to dollar 3.7.1.

Same problem in …/core/class/commonobject.class.php after upgrading to Dolibarr 3.8.0 now on line 3492

Still in 3.8.1 :unhappy:

Warning: Creating default object from empty value in /[…]/core/class/commonobject.class.php on line 3498
Warning: Cannot modify header information - headers already sent by (output started at /[…]/core/class/commonobject.class.php:3498) in /[…]/fourn/commande/card.php on line 713

Hi sbschumacher,

I have same problem, you find a solution ???

NF

Hi FAF,

yes and no :slight_smile: I updated to every stable version since 3.6 and am currently using 3.8.3 but the PHP-Warning is still chasing me. So the only solution is to comment that line out. Just put an hash <#> at the beginning:

[code]

$outputlangs->charset_output=$sav_charset_output;[/code]

Btw.: in Dolibarr 3.8.3 it is line 3498, too.

Everything works fine without that line.

you use a custom pdf model ?

Hi regis,

no I am using the standard “muscadel” with MAIN_INVERT_SENDER_RECIPIENT.

muscadet

yes it’s a bug, you can disable the auto generation of pdf pending the update, with this constant MAIN_DISABLE_PDF_AUTOUPDATE with value 1

1 Like