Title: Plugin is generating warnings
Last modified: August 20, 2016

---

# Plugin is generating warnings

 *  Resolved [bram113](https://wordpress.org/support/users/bram113/)
 * (@bram113)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/)
 * Hello,
 * in my testing environment the plugin seems to create a php warning.
    I’m getting
   the warning several times. Seems to be happening for every item it is hiding.
   It seems to be happening on two different lines in the same .php file. Two of
   the warnings are posted here below
 * Warning: Creating default object from empty value in “_path…\wp-content\plugins\
   contexture-page-security\core\CTXPS\_Security.php_” on line 175
 * Warning: Creating default object from empty value in _“path…\wp-content\plugins\
   contexture-page-security\core\CTXPS\_Security.php_” on line 306
 * I really appreciate this plugin. Thank you for putting in the hard work!
 * Bram
 * [http://wordpress.org/extend/plugins/contexture-page-security/](http://wordpress.org/extend/plugins/contexture-page-security/)

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/plugin-is-generating-warnings/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-is-generating-warnings/page/2/?output_format=md)

 *  Plugin Author [Dutch van Andel](https://wordpress.org/support/users/veraxus/)
 * (@veraxus)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254704)
 * Thanks for the heads up. I’ll add to the to-do list.
 *  [rumeau](https://wordpress.org/support/users/rumeau/)
 * (@rumeau)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254742)
 * Any update on this?, im using it under PHP5.4 and getting warnings also.
 * `Warning: Creating default object from empty value in E:\htdocs\dnk\www\wp-content\
   plugins\contexture-page-security\components\app_components.php on line 462`
 * Thanks.
 *  [ryanlit5797](https://wordpress.org/support/users/ryanlit5797/)
 * (@ryanlit5797)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254743)
 * Same issue here as remeau…
 *  [BeeFer](https://wordpress.org/support/users/beefer/)
 * (@beefer)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254746)
 * same issue here
 *  [philbuchanan](https://wordpress.org/support/users/philbuchanan/)
 * (@philbuchanan)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254747)
 * Ditto
 *  [dmccan](https://wordpress.org/support/users/dmccan/)
 * (@dmccan)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254748)
 * This post might help (worked for me):
 * [https://wordpress.org/support/topic/warning-error-creating-default-object-from-empty-value](https://wordpress.org/support/topic/warning-error-creating-default-object-from-empty-value)
 *  [tom.andersen](https://wordpress.org/support/users/tomandersen/)
 * (@tomandersen)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254750)
 * I am getting the same warnings.
 * For now I have turned the plugin off.
 * The fix looks easy, you need to check for a value being there, or similar.
 *  [kaylynnej](https://wordpress.org/support/users/kaylynnej/)
 * (@kaylynnej)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254755)
 * dmccan:
 * > This post might help (worked for me):
   > [https://wordpress.org/support/topic/warning-error-creating-default-object-from-empty-value](https://wordpress.org/support/topic/warning-error-creating-default-object-from-empty-value)
 * It worked for me as well! You juste have to write the code:
 * `ini_set( 'display_errors', 0 );`
 * at the top of your wp-config file.
 *  [Brian DiChiara](https://wordpress.org/support/users/briandichiara/)
 * (@briandichiara)
 * [13 years ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254757)
 * Please do not do kaylynnej’s suggestion. This is a bad line of code in the plugin:
 * `foreach($content as $post->key => $post->value){`
 * Should be:
 * `foreach($content as $key => $value){`
 * And all the sub-references changed. Please advise, plugin author. Here’s the 
   entire method:
    [https://gist.github.com/solepixel/5407209](https://gist.github.com/solepixel/5407209)
 *  [Brian DiChiara](https://wordpress.org/support/users/briandichiara/)
 * (@briandichiara)
 * [13 years ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254758)
 * I updated the gist above with another issue of the same sort, same file.
    [https://gist.github.com/solepixel/5407209](https://gist.github.com/solepixel/5407209)
 *  [rollingokie](https://wordpress.org/support/users/rollingokie/)
 * (@rollingokie)
 * [13 years ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254759)
 * I was creating my own theme and get the following error when I just bring up 
   the URL in a new browser session:
 * Warning: Creating default object from empty value in /homepages/19/d314064359/
   htdocs/foobar/wp-content/plugins/contexture-page-security/core/CTXPS_Security.
   php on line 103
 * When I logged in to the system, the error went away.
 * I’m running on localhost and using 3.5.1 WordPress.
 * Steve
 *  [Brian DiChiara](https://wordpress.org/support/users/briandichiara/)
 * (@briandichiara)
 * [13 years ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254760)
 * [@rollingokie](https://wordpress.org/support/users/rollingokie/) / Steve, haven’t
   heard from the plugin author, but check out my gist here: [https://gist.github.com/solepixel/5407209](https://gist.github.com/solepixel/5407209)
 * It has updated code for the 2 functions that throw these errors.
 *  [rollingokie](https://wordpress.org/support/users/rollingokie/)
 * (@rollingokie)
 * [13 years ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254761)
 * [@briandichiara](https://wordpress.org/support/users/briandichiara/)
 * Thanks. I did. It didn’t seem to fix the error on line 103. I copied the two 
   functions you made but I threw the same error. Your line numbers were the two
   functions past line 160. I’ll bet it’s the same type of problem.
 * Steve
 *  [Brian DiChiara](https://wordpress.org/support/users/briandichiara/)
 * (@briandichiara)
 * [13 years ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254763)
 * [@rollingokie](https://wordpress.org/support/users/rollingokie/) Ok, I have updated
   the code with the adjustment. Sorry it took so long, take a look at my gist:
 * [https://gist.github.com/solepixel/5407209](https://gist.github.com/solepixel/5407209)
 *  [Brian DiChiara](https://wordpress.org/support/users/briandichiara/)
 * (@briandichiara)
 * [13 years ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/#post-3254765)
 * [@everyone](https://wordpress.org/support/users/everyone/)
 * I noticed more problems with this plugin. Updated gist with another file called/
   contexture-page-security/components/app_components.php. See original gist: [https://gist.github.com/solepixel/5407209](https://gist.github.com/solepixel/5407209)

Viewing 15 replies - 1 through 15 (of 19 total)

1 [2](https://wordpress.org/support/topic/plugin-is-generating-warnings/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-is-generating-warnings/page/2/?output_format=md)

The topic ‘Plugin is generating warnings’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contexture-page-security_324aa9.svg)
 * [Page Security & Membership](https://wordpress.org/plugins/contexture-page-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contexture-page-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contexture-page-security/)
 * [Active Topics](https://wordpress.org/support/plugin/contexture-page-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contexture-page-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contexture-page-security/reviews/)

 * 19 replies
 * 13 participants
 * Last reply from: [Dutch van Andel](https://wordpress.org/support/users/veraxus/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/plugin-is-generating-warnings/page/2/#post-3254776)
 * Status: resolved