Title: PHP Warning: Undefined variable $disabled &#8230;
Last modified: October 28, 2025

---

# PHP Warning: Undefined variable $disabled …

 *  [Ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * (@ov3rfly)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/php-warning-undefined-variable-disabled/)
 * Getting these warnings in `debug.log` with Yoast SEO plugin active.
 *     ```wp-block-code
       [28-Oct-2025 12:35:11 UTC] PHP Warning:  Undefined variable $disabled in .../wp-content/plugins/job-postings/admin/settings.php on line 1254
       ```
   
 * Current code:
 *     ```wp-block-code
       if( !class_exists('WPSEO_Admin') ){	$disabled = "disabled";}echo '<option '.$disabled.' value="yoast_seo" '.selected($fs, 'yoast_seo', false).'>'.__('Yoast SEO', 'job-postings').'</option>';
       ```
   
 * A fix could be similar to this (just add the first line):
 *     ```wp-block-code
       $disabled = '';if( !class_exists('WPSEO_Admin') ){	$disabled = "disabled";}echo '<option '.$disabled.' value="yoast_seo" '.selected($fs, 'yoast_seo', false).'>'.__('Yoast SEO', 'job-postings').'</option>';
       ```
   
 * Job Postings 2.7.17, WordPress 6.7.4, PHP 8.2.x

The topic ‘PHP Warning: Undefined variable $disabled …’ is closed to new replies.

 * ![](https://ps.w.org/job-postings/assets/icon-256x256.jpg?rev=1702382)
 * [Job Postings](https://wordpress.org/plugins/job-postings/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/job-postings/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/job-postings/)
 * [Active Topics](https://wordpress.org/support/plugin/job-postings/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/job-postings/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/job-postings/reviews/)

## Tags

 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)
 * [undefined](https://wordpress.org/support/topic-tag/undefined/)
 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * 0 replies
 * 1 participant
 * Last reply from: [Ov3rfly](https://wordpress.org/support/users/ov3rfly/)
 * Last activity: [7 months, 1 week ago](https://wordpress.org/support/topic/php-warning-undefined-variable-disabled/)
 * Status: not resolved