Error when using emailOnApproved plugin with PHP 7.4

3 posts by 2 authors in: Forums > CMS Builder
Last Post: May 26   (RSS)

By gkornbluth - May 20 - edited: May 23

Hi All,

I have an event listing system that allows a musician to request an event listing.

The request generates an email to the admin with a link similar to the following that adds the listing record when clicked on.

I’ve been successfully using a simple plugin called emailOnApproved (attached) to send an email to the person listing an event when an approved checkbox is checked in the new record.

The system works perfectly in PHP 7.3 but throws the attached error with PHP 7.4.

Creating a listing record manually (with the plugin enabled) throws the same error in PHP 7.4.

There is no error thrown when the emailOnApproved plugin is deactivated.

Any ideas


Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at:

By Dave - May 25

Hi Jerry, 

Can you try just hiding the warnings and see if everything still works?  Just add @ as follows:

  $wasChecked   = intval(!@$oldRecord[$fieldname] && @$_REQUEST[$fieldname]);
  $wasUnchecked = intval(@$oldRecord[$fieldname]  && !@$_REQUEST[$fieldname]);

Let me know if that works for you.

Dave Edis - Senior Developer