• Resolved fehler7

    (@fehler7)


    Since version 3.0, the plugin causes a fatal error.
    Starting from this version, the plugin uses “Simple HTML DOM”.
    If another plugin (e.g., EmbedPress) also uses Simple HTML DOM, a fatal error occurs because the Taboola plugin does not check whether the library has already been included.

    The error message is typically: Fatal error: Cannot redeclare function …

    Solution:

    In the file taboola_widget.php, replace this line:

    require_once plugin_dir_path( FILE ) . ‘simple_html_dom.php’; // ← NEW

    with this:

    if ( ! class_exists( ‘simple_html_dom’ ) ) {
    require_once plugin_dir_path( FILE ) . ‘simple_html_dom.php’; // ← NEW
    }

    This change ensures that Simple HTML DOM is only loaded if it has not already been included by another plugin or theme.
    It prevents function redeclaration errors and improves compatibility with other plugins that use the same library.

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

    (@iamhrsrv)

    Hi @fehler7
    Thanks for letting us know
    We have reviewed this issue and plan to deploy the fix tomorrow after conducting tests with another plugin that also bundles Simple HTML DOM.

    Cheers
    Harsh Srivastava

    Plugin Author iamhrsrv

    (@iamhrsrv)

    Hi @fehler7 ,
    We’ve just pushed the update as version 3.0.2, which includes the bug fix you mentioned.
    We have tested the update, and it should now prevent the fatal error caused by duplicate Simple HTML DOM declarations.

    Thanks again for bringing this to our attention!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fatal error since 3.0’ is closed to new replies.