Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
4.15 - PDFWOPrint.php Use of Undefined constant action Error
11-06-2018, 03:51 AM,
#1
4.15 - PDFWOPrint.php Use of Undefined constant action Error
Hello,

I'm getting the following error trying to Print a Work Order in 4.15.

Notice: Use of undefined constant action - assumed 'action' in /share/MD0_DATA/Web/webERP/PDFWOPrint.php on line 314

Notice: Use of undefined constant action - assumed 'action' in /share/MD0_DATA/Web/webERP/PDFWOPrint.php on line 314

Notice: Undefined index: HTTPS in /share/MD0_DATA/Web/webERP/PDFWOPrint.php on line 476

Warning: Cannot modify header information - headers already sent by (output started at /share/MD0_DATA/Web/webERP/PDFWOPrint.php:314) in /share/MD0_DATA/Web/webERP/includes/tcpdf/tcpdf.php on line 7693
TCPDF ERROR: Some data has already been output to browser, can't send PDF file

Your help is appreciated.
Reply
11-06-2018, 01:52 PM, (This post was last modified: 11-06-2018, 02:09 PM by TurboPT.)
#2
RE: 4.15 - PDFWOPrint.php Use of Undefined constant action Error
Thanks for the report!

Can you try to change lines 314 and 316 from this:
PHP Code:
if ($RequirementsRow['autoissue']==0){
    
$WOLine[$i][action]='Manual Issue';  // line 314
} else {
    
$WOLine[$i][action]='Auto Issue';   // line 316


...to this?
PHP Code:
if ($RequirementsRow['autoissue']==0){
    
$WOLine[$i]['action']='Manual Issue';
} else {
    
$WOLine[$i]['action']='Auto Issue';


...and then change line 476 from this:
PHP Code:
    $Http $_SERVER['HTTPS']?'https://':'http://'

...to this?
PHP Code:
    $Http = !empty($_SERVER['HTTPS']) ? 'https://' 'http://'

Let me know if those work, I'll commit the changes later this week.

That should help the last error too, since the Notice output likely contributed to the "headers already sent" Warning message.
Reply
11-06-2018, 11:35 PM,
#3
RE: 4.15 - PDFWOPrint.php Use of Undefined constant action Error
Your fix resolved the issue. Please commit. Thank you!
Reply
11-07-2018, 01:36 PM,
#4
RE: 4.15 - PDFWOPrint.php Use of Undefined constant action Error
Changes committed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)