inpsyde / translation-cache

Improves site performance by caching translation files using WordPress object cache.
GNU General Public License v2.0
42 stars 4 forks source link

Undefined variable found in MoCache.php #2

Closed ahmed-sigmalux closed 7 years ago

ahmed-sigmalux commented 7 years ago

I'm running WordPress 4.8.1 with Memcached for object caching. When I enable Translation Cache, I see this warning hundreds of times in my debug.log:

[20-Sep-2017 02:46:54 UTC] PHP Notice:  Undefined variable: found in /mnt/disks/www/wordpress/wp-content/plugins/translation-cache/src/MoCache.php on line 339
[20-Sep-2017 02:46:54 UTC] PHP Notice:  Undefined variable: found in /mnt/disks/www/wordpress/wp-content/plugins/translation-cache/src/MoCache.php on line 340

Any idea what's going on here?

gmazzap commented 7 years ago

Hi @ahmed-sigmalux, thanks for reporting.

The issue is probably caused by some object cache dropin that defines wp_cache_get() without $found or without assigning it be reference.

But I'm going to fix this.

gmazzap commented 7 years ago

@ahmed-sigmalux The issue should be fixed in master branch. Could you give it a test before I do the release?

ahmed-sigmalux commented 7 years ago

Yes, that fixed the problem.

Thanks!