Under PHP 7.2, there are warning messages in the log whenever cron runs to send Watcher emails.

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _watcher_email_notifications_send_queue() (line 2890 of /home/xxxxx/public_html/sites/all/modules/watcher/watcher.module).

There may be other areas that need a bit of tuning up for 7.2 as well.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jabeler created an issue. See original summary.

Shreevasa Tantry’s picture

Status: Active » Needs review
FileSize
646 bytes

Please review the patch file.

jabeler’s picture

Thanks!

I've applied the patch, but am now getting the following errors.

ParseError: syntax error, unexpected '&&' (T_BOOLEAN_AND) in drupal_load() (line 2890 of /home/xxx/public_html/sites/all/modules/watcher/watcher.module).

Matthewsmith619’s picture

Jabeler where you able to fix this issue I am getting the same error.

xurizaemon’s picture

Status: Needs review » Needs work

The patch attached in #2 generates invalid PHP.

foreach ( $qmsgs as &$qmsg ) && _watcher_email_notifications_send_queue_timer()) {

Setting back to Needs Work accordingly.

Matthewsmith619’s picture

FileSize
870 bytes

Hello the patch posted first will not work. Here is a working patch with valid PHP.

xurizaemon’s picture

Please check the proposed patch for coding standards. Refer https://www.drupal.org/docs/develop/standards

nitin_lama’s picture

Assigned: Unassigned » nitin_lama
nitin_lama’s picture

Assigned: nitin_lama » Unassigned
Status: Needs work » Needs review
FileSize
838 bytes
1003 bytes

updated patch as per #7