Bug with output buffering
-
Hello,
Within yourfunction brand_shortcode
you have a bug. Within a conditional statement e.g.if ( is_array( $brands ) && ! empty( $brands ) ) {
you start the output buffering. At the end of the function, you use theob_get_clean()
to return the buffer content.
Now, the problem is, if the conditional is not fulfilled, it will not start the buffering, but still use theob_get_clean()
which will break any other code using its own output buffering.
You can replicate the issue while using WP Hide plugin. When viewing a WooCommerce Product, none of the URLs replacements occurs, as you hijack the other plugin buffering callback.Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Bug with output buffering’ is closed to new replies.