awesomemotive / all-in-one-seo-pack

All in One SEO plugin for WordPress SEO
https://aioseo.com
339 stars 155 forks source link

Fix PHP warning #3025

Closed arnaudbroes closed 4 years ago

arnaudbroes commented 4 years ago

Issue #3014

Proposed changes

Fix for issue where the paginated homepage (set to show latest posts) doesn't return a queried object for the robots meta code.

Types of changes

Checklist

Testing instructions

  1. First, create a new website and install All in One SEO Pack v3.3.
  2. Create 15 or so posts (use https://github.com/arnaudbroes/endless-post-creator if you're lazy) so that the homepage is paginated and navigate to the second page. Two errors appear.
  3. Install the PR and confirm that the issue has been fixed.

Extra comments

Also replaced global $aioseop_options with a class variable to remove a few redundant lines.

michaeltorbert commented 4 years ago

This is tested and is good.