Title: Errors with class-permalink.php
Last modified: March 3, 2026

---

# Errors with class-permalink.php

 *  Resolved [kdcpelt](https://wordpress.org/support/users/kdcpelt/)
 * (@kdcpelt)
 * [1 month ago](https://wordpress.org/support/topic/errors-with-class-permalink-php/)
 * Can someone help? I see these errors in the log:
 * [03-Mar-2026 11:21:24 UTC] PHP Warning: foreach() argument must be of type array
   |object, bool given in /wp-content/plugins/directorist/includes/model/SingleListing.
   php on line 1012
   [03-Mar-2026 11:21:24 UTC] PHP Warning: foreach() argument must
   be of type array|object, bool given in /wp-content/plugins/directorist/templates/
   single/header.php on line 20[03-Mar-2026 12:10:41 UTC] PHP Warning: Attempt to
   read property “slug” on bool in /wp-content/plugins/directorist/includes/classes/
   class-permalink.php on line 523[03-Mar-2026 12:19:36 UTC] PHP Warning: Attempt
   to read property “slug” on bool in /wp-content/plugins/directorist/includes/classes/
   class-permalink.php on line 523[03-Mar-2026 12:20:33 UTC] PHP Warning: Attempt
   to read property “slug” on bool in /wp-content/plugins/directorist/includes/classes/
   class-permalink.php on line 523[03-Mar-2026 12:22:11 UTC] PHP Warning: Attempt
   to read property “slug” on bool in /wp-content/plugins/directorist/includes/classes/
   class-permalink.php on line 523[03-Mar-2026 13:49:34 UTC] PHP Warning: Attempt
   to read property “slug” on bool in /wp-content/plugins/directorist/includes/classes/
   class-permalink.php on line 470[03-Mar-2026 13:57:20 UTC] PHP Warning: Attempt
   to read property “slug” on bool in /wp-content/plugins/directorist/includes/classes/
   class-permalink.php on line 574[03-Mar-2026 13:58:51 UTC] PHP Warning: Attempt
   to read property “slug” on bool in /wp-content/plugins/directorist/includes/classes/
   class-permalink.php on line 523[03-Mar-2026 14:16:55 UTC] PHP Warning: Attempt
   to read property “slug” on bool in /wp-content/plugins/directorist/includes/classes/
   class-permalink.php on line 470

Viewing 1 replies (of 1 total)

 *  Plugin Support [Al-Amin Khan](https://wordpress.org/support/users/alamin56649/)
 * (@alamin56649)
 * [1 month ago](https://wordpress.org/support/topic/errors-with-class-permalink-php/#post-18840188)
 * Hi [@kdcpelt](https://wordpress.org/support/users/kdcpelt/),
 * Those logs are very helpful. In short, “Attempt to read property ‘slug’ on bool”
   means the plugin is looking for a category or listing object that doesn’t exist(
   returning `false` instead).
 * Since the errors are tied to `class-permalink.php`, please try these three standard
   steps:
    1. **Flush Permalinks (The “Quick Fix”):** Go to **Settings > Permalinks** and 
       click **Save Changes** twice. This often resolves errors in permalink-related
       files by rebuilding the URL map.
    2. **Check for “Ghost” Data:** Ensure you haven’t recently deleted a category or
       listing that is still being called by a widget, menu, or shortcode. Also, verify
       that your “Listing” and “Search” pages are still published in **Pages > All 
       Pages**.
    3. **Conflict Test:** Use the [Health Check & Troubleshooting](https://www.google.com/search?q=https://wordpress.org/plugins/health-check/)
       plugin to temporarily disable other plugins and switch to a default theme (like
       Twenty Twenty-Four). This will tell you if another plugin is interfering with
       Directorist’s data.
 * If the warnings persist, it may be a site-specific database issue. In that case,
   I recommend reaching out to **[Directorist Support](https://directorist.com/contact/)**
   directly so they can investigate your configuration further.
 * Let us know if flushing the permalinks clears those logs!

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferrors-with-class-permalink-php%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/directorist/assets/icon-256x256.gif?rev=3185058)
 * [Directorist: AI-Powered Business Directory, Listings & Classified Ads](https://wordpress.org/plugins/directorist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/directorist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/directorist/)
 * [Active Topics](https://wordpress.org/support/plugin/directorist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/directorist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/directorist/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Al-Amin Khan](https://wordpress.org/support/users/alamin56649/)
 * Last activity: [1 month ago](https://wordpress.org/support/topic/errors-with-class-permalink-php/#post-18840188)
 * Status: resolved