the_post() returns pages and autosaves with PHP 5.3
-
Hello guys.
A new client of mine left their old developer and now when their host is upgrading to PHP 5.3 they’ve got some big problems with their site.The big problem seems to be a list that prints all posts using “The Loop”. The code for this is here https://pastebin.com/QpVeEL2d
For some reason when using PHP 5.3 the_post() returns not only posts from all categories (as it should) but also PAGES and even revisions/autosaves from posts. (ex: links to /3267-revision-3/).
I’m also having problem with a slider that uses the_post() to gather images and print them. This slider shows titles of pages and posts instead of the images when using PHP 5.3.
Anyone have any idea why this is happening?
I’ve set up the website on two servers. It’s THE SAME database and COPIED files. The only difference is that one server is using PHP 5.3 and the other one is using PHP 5.2.
https://www.jobbjet.se/ (PHP 5.2; working version!)
https://devlopese.jobbjet.se/ (PHP 5.3; have not changed baseURL so if you navigate it will redirect you)
- The topic ‘the_post() returns pages and autosaves with PHP 5.3’ is closed to new replies.