WordPress.org

Ready to get started?Download WordPress

Forums

Page Security by Contexture
[resolved] Plugin is generating warnings (20 posts)

  1. bram113
    Member
    Posted 1 year ago #

    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/

  2. Matt van Andel
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the heads up. I'll add to the to-do list.

  3. rumeau
    Member
    Posted 1 year ago #

    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.

  4. ryanlit5797
    Member
    Posted 1 year ago #

    Same issue here as remeau...

  5. BeeFer
    Member
    Posted 1 year ago #

    same issue here

  6. philbuchanan
    Member
    Posted 1 year ago #

    Ditto

  7. David
    Member
    Posted 1 year ago #

  8. tom.andersen
    Member
    Posted 1 year ago #

    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.

  9. kaylynnej
    Member
    Posted 1 year ago #

    dmccan:

    This post might help (worked for me):

    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.

  10. briandichiara
    Member
    Posted 1 year ago #

    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

  11. briandichiara
    Member
    Posted 1 year ago #

    I updated the gist above with another issue of the same sort, same file.
    https://gist.github.com/solepixel/5407209

  12. rollingokie
    Member
    Posted 1 year ago #

    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

  13. briandichiara
    Member
    Posted 1 year ago #

    @rollingokie / Steve, haven't heard from the plugin author, but check out my gist here: https://gist.github.com/solepixel/5407209

    It has updated code for the 2 functions that throw these errors.

  14. rollingokie
    Member
    Posted 1 year ago #

    @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

  15. briandichiara
    Member
    Posted 1 year ago #

    @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

  16. briandichiara
    Member
    Posted 1 year ago #

    @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

  17. dhoffmann
    Member
    Posted 1 year ago #

    Hi briandichiara,

    I'm not familiar with github. Could you give us a version as a download?

    Best wishes

    Daniel

  18. Matt van Andel
    Member
    Plugin Author

    Posted 10 months ago #

    I fixed as many of these bugs as I could find in 1.5.9. If any more problems pop up please let me know and I'll fix them quickly.

    I'm pushing forward full steam on a complete replacement for PSC (not an update, but a completely new plugin). It's still very, very early (as in, not yet functional) but you can track progress on Github...

    https://github.com/Veraxus/groupie

    FYI, the name is tentative. ;-)

  19. KristianK
    Member
    Posted 10 months ago #

    Hi there,

    I get the warning as follows: Warning: Creating default object from empty value in /home/somnides/public_html/wp-content/plugins/contexture-page-security/core/CTXPS_Security.php on line 238

    Thank you for updating the plugin to remove these bugs

  20. Matt van Andel
    Member
    Plugin Author

    Posted 9 months ago #

    I just released 1.5.10, which should solve any remaining PHP errors or warnings. Thank you for the support and reports, everyone!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic