Title: PHP 7.4 HUGE error
Last modified: May 13, 2021

---

# PHP 7.4 HUGE error

 *  Resolved [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/)
 * (@dcbuffalo)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/php-7-4-huge-error/)
 * We recently updated this plugin, AND updated the cPanel to PHP 7.4, and immediately
   the site was generating massive amounts of PHP errors similar to this:
 * [13-May-2021 15:47:36 UTC] PHP Warning: Use of undefined constant name – assumed‘
   name’ (this will throw an Error in a future version of PHP) in /home/myqualityoptics/
   public_html/wp-content/themes/quality-optics-2020/woocommerce/pdf/quality-optics-
   order-form/invoice.php on line 46
    [13-May-2021 15:47:36 UTC] PHP Warning: Use
   of undefined constant name – assumed ‘name’ (this will throw an Error in a future
   version of PHP) in /home/myqualityoptics/public_html/wp-content/themes/quality-
   optics-2020/woocommerce/pdf/quality-optics-order-form/invoice.php on line 52 [
   13-May-2021 15:47:36 UTC] PHP Warning: Use of undefined constant value – assumed‘
   value’ (this will throw an Error in a future version of PHP) in /home/myqualityoptics/
   public_html/wp-content/themes/quality-optics-2020/woocommerce/pdf/quality-optics-
   order-form/invoice.php on line 53 [13-May-2021 15:47:36 UTC] PHP Warning: Use
   of undefined constant name – assumed ‘name’ (this will throw an Error in a future
   version of PHP) in /home/myqualityoptics/public_html/wp-content/themes/quality-
   optics-2020/woocommerce/pdf/quality-optics-order-form/invoice.php on line 58
 * (multiple lines, all the way up to line 689 and then it stops)
 * I have my back-end developer looking at our customized invoice.php file to see
   if it needs anything updated, but as soon as I switch the cPanel back to PHP 
   7.4, the errors stop generating.
 * Thoughts?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/)
 * (@dcbuffalo)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/php-7-4-huge-error/#post-14435349)
 * By HUGE – what I mean is, the php error log got up to 5.8 GB, and it was increasing
   by about 1-2MB per minute. Constant errors.
 *  Plugin Contributor [Darren Peyou](https://wordpress.org/support/users/dpeyou/)
 * (@dpeyou)
 * [5 years ago](https://wordpress.org/support/topic/php-7-4-huge-error/#post-14436258)
 * Hi [@dcbuffalo](https://wordpress.org/support/users/dcbuffalo/),
 * I’m sorry you’re dealing with issues like this. 🙁
 * Are you working with a custom template? At first glance it looks you have a mistake
   with your code somewhere in there.
    -  This reply was modified 5 years ago by [Darren Peyou](https://wordpress.org/support/users/dpeyou/).
 *  Thread Starter [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/)
 * (@dcbuffalo)
 * [5 years ago](https://wordpress.org/support/topic/php-7-4-huge-error/#post-14440260)
 * I will have the back-end developer take a look. We created a custom invoice to
   pull in variables from the TM Extra Product Options plugin. It’s all working 
   on the front-end just fine, so I’m sure there’s just some wacky extra or missing
   syntax somewhere.
 * Thanks!
 *  Thread Starter [dcbuffalo](https://wordpress.org/support/users/dcbuffalo/)
 * (@dcbuffalo)
 * [5 years ago](https://wordpress.org/support/topic/php-7-4-huge-error/#post-14486727)
 * So the original back-end developer isn’t responding. I checked the code, and 
   added the new “line 1” to the custom invoice, but otherwise it looks fine to 
   me. All of the errors are being generated based on custom field values that are
   being called in from the TM Extra Product Options plugin. The field values are
   being correctly imported and printed on the invoices, but these giant sequences
   of errors are being generated whenever someone clicks to generate and download
   an invoice. We cleared the error log out a couple of weeks ago, and it’s already
   back up to almost 800MB.
 * Is there a chance that someone there could take a look?
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [5 years ago](https://wordpress.org/support/topic/php-7-4-huge-error/#post-14487214)
 * you will need to correct the errors that are collected in your error log, just
   go over them one by one:
 *     ```
       undefined constant name – assumed 'name' ... invoice.php on line 46
       ```
   
 * check for code with with `name` instead of `'name'` and change accordingly. Same
   for line 52.
 *     ```
       Use of undefined constant value – assumed 'value' ... invoice.php on line 46
       ```
   
 * check for code with with `value` instead of `'value'` and change accordingly.
 * etc…
 * you don’t necessarily need the original developer – anyone with basic knowledge
   of PHP should be able to fix these if you provide them with the `invoice.php`
   file (and perhaps the full list of errors).
 * Good luck!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘PHP 7.4 HUGE error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [Ewout](https://wordpress.org/support/users/pomegranate/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/php-7-4-huge-error/#post-14487214)
 * Status: resolved