• Resolved geemco

    (@geemco)


    An error of type E_COMPILE_ERROR was caused in line 1 of the file …../wp-content/plugins/post-snippets/src/PostSnippets/Shortcode.php(104) : eval()’d code. Error message: Cannot redeclare randomString() (previously declared in …../wp-content/plugins/post-snippets/src/PostSnippets/Shortcode.php(104) : eval()’d code:1)

    Plugin version 3.1.2
    PHP version 7.4.14

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter geemco

    (@geemco)

    I’ve digged a bit deeper into that issue. Reason is that a snippet includes the definition of the mentioned function. Each use of the snippet causes a repetitive definition of the same function which is not allowed in PHP. I’ve encapsulated the function definition by a if (!function_exists(randomString)) { } which resolved the issue.

    However, I’m still wondering why this hasn’t been a problem before as the resp. snippet is in use for quite some time (prior to WP 5.6).

    By the way, when will PostSnippets be made fully compatible with WP 5.6, resp. confirmed to be compatible?

    Hi @geemco,

    Thank you for contacting us. Can you please share the steps to reproduce the issue as we cannot replicate it on our end, or kindly open a support ticket at our official website to help you accordingly?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Plugin raises an exception in WP 5.6 when saving/updating a post or page’ is closed to new replies.