Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
4.15 - PDFWOPrint.php Use of Undefined constant action Error
11-06-2018, 03:51 AM
Post: #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.
Find all posts by this user
Quote this message in a reply
11-06-2018, 01:52 PM (This post was last modified: 11-06-2018 02:09 PM by TurboPT.)
Post: #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.
Find all posts by this user
Quote this message in a reply
11-06-2018, 11:35 PM
Post: #3
RE: 4.15 - PDFWOPrint.php Use of Undefined constant action Error
Your fix resolved the issue. Please commit. Thank you!
Find all posts by this user
Quote this message in a reply
11-07-2018, 01:36 PM
Post: #4
RE: 4.15 - PDFWOPrint.php Use of Undefined constant action Error
Changes committed.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)