Call to undefined function __()
-
</img> Dear @olliejones, I really enjoy the christmas-present, you made to the community in the end of last year. Thank you very, very much!
</img>
After 3 weeks of testing, there was only one small caveat I had to come around.
For some unknown reason and during one of this crazy development nights, at some point my logs screamed at me:
01:06:45 UTC] Exception: database disk image is malformed in [..]/wp-content/object-cache.php:490 01:06:45 UTC] sqlite_object_cache connection failure, deleting sqlite files to retry. 1 01:06:45 UTC] PHP Fatal error: Uncaught Error: Call to undefined function __() in [...]/wp-admin/includes/file.php:16
So I went down the rabbit hole and found out, that I can avoid this fatal.
// needed for __() require_once ABSPATH . 'wp-includes/l10n.php';
I added this to your existing
private function delete_offending_files()
at around line 1821, in theobject-cache.php
dropin.With this fix in place the regeneration of the corrupted db, was not a problem anymore.
Was this a proper solution?
And would you like to implement this in a upcoming release?Maybe you could have a look into this.
—
I could also create an Issue & PR at github if you want.
- The topic ‘Call to undefined function __()’ is closed to new replies.