Support » Plugin: Ultimate Posts Widget » Fix for create_function deprecated in PHP 7.2

  • Resolved KTS915

    (@kts915)


    A couple of lines in ultimate-posts-widget.php need to be changed to use anonymous functions.

    So line 154 should go from this:
    $new_excerpt_more = create_function('$more', 'return "...";');
    to this:

    $new_excerpt_more = function($more) {
         return '...';
    };

    And line 158 should go from this:
    $new_excerpt_length = create_function('$length', "return " . $excerpt_length . ";");
    to this:

    $new_excerpt_length = function($length) {
        return ' . $excerpt_length . ';
    };
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author cl272

    (@cl272)

    Thank you for reporting this, we just fixed it in the plugin version we just uploaded.

    KTS915

    (@kts915)

    Thank you — and thank you for the plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fix for create_function deprecated in PHP 7.2’ is closed to new replies.