WordPress.org

Ready to get started?Download WordPress

Forums

Quick Cache (Speed Without Compromise)
[Plugin: Quick Cache ( A WP Super Cache Alternative )] Quick Cache pro-module include fail (1 post)

  1. nikc
    Member
    Posted 3 years ago #

    This applies at least to Quick Cache version 2.2.7.

    Line 75 in quick-cache.php:

    /*
    Load a possible Pro module, if/when available.
    */
    @include_once dirname (__FILE__) . "-pro/pro-module.php";

    Everytime you do this, God kills a kitten. Twice!

    Seriously, error messages should not be suppressed - OPERATIONS THAT CAUSE ERRORS SHOULD BE FIXED. That's why we have these cool constructs called ifs, enabling you to check if an action might cause an error and thus avoid it altogether.

    Fix by changing line 75 to:

    /*
    Load a possible Pro module, if/when available.
    */
    if (file_exists(dirname (__FILE__) . "-pro/pro-module.php") && is_readable(dirname (__FILE__) . "-pro/pro-module.php")) {
        include_once dirname (__FILE__) . "-pro/pro-module.php";
    }

    Now, that wasn't so hard, was it?

    The fact which bums me the most about this, is that Quick Cache is a really kick ass plugin.

    Lesson to be learned:

    Don't hide errors while you're developing and don't stop fixing until there are no errors to hide. Even if you in your prod environment don't see the errors (with show_errors turned off, I hope) it will be logged. Unnecessary log messages clutter log files. Cluttered log files are useless. So, fix your errors.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic