tobeyadr / mailhawk

1 stars 0 forks source link

Usage of `__DIR__` causing plugin load errors #2

Closed thomasplevy closed 4 years ago

thomasplevy commented 4 years ago

LifterLMS has integration tests setup with MailHawk and these just started failing as a result of this line:

https://github.com/tobeyadr/mailhawk/commit/e3876ef32dbe505db2caccba4888c9985290132d#diff-c6198f136e16a79313a531079dad2cfbL47

I believe a quick fix would be:

require __DIR__ . '/includes/plugin.php';

Backtrace:

PHP Warning:  Uncaught require(/home/travis/build/gocodebox/lifterlms/tmp/tests/wordpress/wp-content/plugins/mailhawkincludes/plugin.php): failed to open stream: No such file or directory
/home/travis/build/gocodebox/lifterlms/tmp/tests/wordpress/wp-content/plugins/mailhawk/mailhawk.php:47
/home/travis/build/gocodebox/lifterlms/tmp/tests/wordpress/wp-content/plugins/mailhawk/mailhawk.php:47
/home/travis/build/gocodebox/lifterlms/tmp/tests/wordpress/wp-admin/includes/plugin.php:650
/home/travis/build/gocodebox/lifterlms/includes/abstracts/llms-abstract-email-provider.php:364
/home/travis/build/gocodebox/lifterlms/includes/abstracts/llms-abstract-email-provider.php:320
/home/travis/build/gocodebox/lifterlms/includes/abstracts/llms-abstract-email-provider.php:292
/home/travis/build/gocodebox/lifterlms/vendor/lifterlms/lifterlms-tests/framework/class-llms-unit-test-util.php:31
/home/travis/build/gocodebox/lifterlms/tests/phpunit/unit-tests/admin/class-llms-test-mailhawk.php:157
tobeyadr commented 4 years ago

Thanks for the heads up, we just patched this as a result.

thomasplevy commented 4 years ago

Thanks @tobeyadr !