Open lgedeon opened 4 years ago
Also noting that it could be an improvement to use the third paramater in get_post_meta()
as well: https://developer.wordpress.org/reference/functions/get_post_meta/
Then it will be returned as a string and not as an array that needs to be imploded.
We were seeing thousands of the following error on a WordPress VIP client's site: Warning: implode(): Argument must be an array in /expiring-posts/expiring-posts.php on line 91
The PR https://github.com/ivankruchkoff/wp-expiring-posts/pull/7 fixed the error locally. We would like to add this into the next version of the plugin.
Line numbers may not match exactly because of version differences. This is the line that triggered the error:
On this line,
get_post_meta()
was failing when the global$post
was not set, which in turn triggered the warning onimplode()
.