• Hi all!
    If you receive the php warning:

    Deprecated: Unparenthesized 'a ? b : c ? d : e' is deprecated. Use either '(a ? b : c) ? d : e' or 'a ? b : (c ? d : e)' in /path/to/wp-content/plugins/honeypot-toolkit/lib/HoneypotToolkit.class.php on line xxx
    Here is the fix:
    change line 209 from:
    $activityNotes .= (isset($_SERVER['SERVER_NAME']))? htmlentities($_SERVER['SERVER_NAME']):(isset($_SERVER['HTTP_HOST']))? htmlentities($_SERVER['HTTP_HOST']):'';
    to:
    $activityNotes .= ((isset($_SERVER['SERVER_NAME']))? htmlentities($_SERVER['SERVER_NAME']):(isset($_SERVER['HTTP_HOST'])))? htmlentities($_SERVER['HTTP_HOST']):'';
    change line 337 from:
    $activityNotes .= (isset($_SERVER['SERVER_NAME']))? htmlentities($_SERVER['SERVER_NAME']):(isset($_SERVER['HTTP_HOST']))? htmlentities($_SERVER['HTTP_HOST']):'';
    to:
    $activityNotes .= ((isset($_SERVER['SERVER_NAME']))? htmlentities($_SERVER['SERVER_NAME']):(isset($_SERVER['HTTP_HOST'])))? htmlentities($_SERVER['HTTP_HOST']):'';
    change line 364 from:
    $activityNotes .= ((isset($_SERVER['SERVER_NAME']))? htmlentities($_SERVER['SERVER_NAME']):(isset($_SERVER['HTTP_HOST']))? htmlentities($_SERVER['HTTP_HOST']):'');
    to:
    $activityNotes .= (((isset($_SERVER['SERVER_NAME']))? htmlentities($_SERVER['SERVER_NAME']):(isset($_SERVER['HTTP_HOST'])))? htmlentities($_SERVER['HTTP_HOST']):'');

    Hopefully Jeff will have some time to fix this and push out an update.
    Thanks!
    Brian Brown, Ph.D
    @brianbrown

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeff Sterup

    (@foomagoo)

    Just committed version 4.1.2 which should fix that warning. Sorry it took so long. Been pretty busy.

    Thread Starter Brian Brown, Ph.D.

    (@brianbrown)

    Thanks for the quick fix, Jeff.
    I see in the logs, getting:

    [20-Aug-2020 14:21:20 UTC] PHP Notice:  Undefined offset: 0 in /path/to/wp-content/plugins/honeypot-toolkit/lib/HoneypotToolkit.class.php on line 876
    [20-Aug-2020 14:21:20 UTC] PHP Notice:  Trying to access array offset on value of type null in /path/to/wp-content/plugins/honeypot-toolkit/lib/HoneypotToolkit.class.php on line 876

    Just FYI.
    I’ll have a looksee when I get some time.
    Thanks!
    @brianbrown

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php 7.x warning: “Deprecated: Unparenthesized …” – FIX’ is closed to new replies.