Undefined index: expireType
-
On the Post Expirator Options page (having WP_DEBUG set to true in wp-config.php) there’s an error message that repeats for each post type:
Notice: Undefined index: expireType in C:\xxx\xxxx\www\wp-content\plugins\post-expirator\post-expirator.php on line 1185
I tried updating the plugin to 2.3.1.1 but the error/notice is still there. That led me to open the post-expirator.php file in PhpStorm. The IDE reported the following code errors:
632: Undefined constant POSTEXPIRATOR_PAGESTATUS
636: Undefined variable ‘expireType’
737: Undefined variable ‘merged’
1372: Undefined variable ‘type’
1617: Undefined variable ‘popular_cats’
1638: Undefined variable ‘selected’
1672: Undefined variable ‘selected’I haven’t actually studied the code in detail to verify that these issues aren’t false positives, but I’ve found that PhpStorm is usually correct (and even when it isn’t the error usually indicates bad coding practices).
I’m therefore suggesting a major code overhaul/code review to improve code quality.
The page I need help with: [log in to see the link]
- The topic ‘Undefined index: expireType’ is closed to new replies.