I recently updated Mamp, and with it the PHP version running on localhost. I noticed that many of my older projects throw errors on this new PHP version. It runs 7.2.7 and if I downgrade to an older version the errors disappear. All these projects run on the client server without error since they run an older version of PHP.
The most common error:
foreach($page->children()->visible() as $p):
Undefined variable p
Regardless of the query or the variable name. The for loop is in a template file, not a snippet so no variables need to be passed.
Another common one:
<?= $pages->find('contact')->url() ?>
Call to a member function url() on boolean
Anyone else running into problems?