• Resolved DrLightman

    (@drlightman)


    Hello,

    getting this deprecation message with PHP 7.4

    Deprecated: Cannot use “parent” when current class scope has no parent in D:\WWW\html\wp-content\plugins\ninja-forms\includes\Abstracts\Field.php on line 210

Viewing 15 replies - 1 through 15 (of 18 total)
  • Pavel I

    (@pavelvisualcomposer)

    also got this right after plugin activation

    I have the same issue. Deprecated: Cannot use “parent” when current class scope has no parent in /home/sdweets/public_html/wp-content/plugins/ninja-forms/includes/Abstracts/Field.php on line 210

    Does anyone know how to fix it

    Same issue.
    It happens on all pages (back-end + front-end).
    I have recently updated from PHP 7.3 to 7.4.

    Plugin Contributor Justin McElhaney

    (@jmcelhaney)

    This PHP warning is due to PHP 7.4 It should not have any effect on the functionality of your form. Our developers have an issue in our system to address this.

    Ced

    (@cedriccharles)

    Hello there ??

    It’s been 2 months since this post. I still have the issue… When this will be resolved? It’s quite annoying when trying to debug something and have these messages all the time…

    Thank you,
    Cedric

    Ced

    (@cedriccharles)

    Hello there ??

    I still have the issue… When this will be resolved? It’s quite annoying when trying to debug something and have these messages all the time…

    Thank you,
    Cedric

    Has this been resolved? This issue just showed up today on my site.

    Ced

    (@cedriccharles)

    No… Always the same here and Ninja Forms doesn’t seem to answer…

    Do we have some fix for this issue? I just installed the plugin and still showing the same as you guys.

    Can’t you just change ‘parent’ to ‘this’ and its fixed?

    Maybe I’m oversimplifying the problem but I see no ‘extends’ on the NF_Abstracts_Field class, so there is no parent for this class. Other than that, if you do need to reference another class for this again shouldn’t be too difficult.

    • This reply was modified 4 years, 4 months ago by David.
    • This reply was modified 4 years, 4 months ago by David.

    So, this error was first reported over 4 months ago, and no answer or update? You’d think a company as widely used as Ninja Forms would be better than this??? Guess I have some work converting some client sites ahead of me …

    What’s the best alternative to Ninja? I’m ready to move.

    Plugin Contributor Justin McElhaney

    (@jmcelhaney)

    This deprecated notice is actively being addressed by our developers. We have a possible fix for it, but we are currently running tests to make sure it does not break any other functionality.
    I am sorry for any confusion about old code repositories. All of our code is now hosted on a private GitHub repository. I have mentioned about the old repos to our developers so they can be removed.

    Although the error messages don’t appear to cause any operational problems they do seriously clutter up my debug logs making it difficult to spot more important messages.

    Even using error_reporting() in wp-config.php to disable E_DEPRECATED messages has no effect. It appears that the errors are being triggered early in the process before the reporting level is set from wp-config.php.

    As a workaround I’ve created the following mu-plugin so set the error reporting level earlier in the process and this suppresses all the “Cannot use parent” messages.

    <?php
    /*
    Plugin Name: Error-reporting settings
    Description: Ensure early setting of error_reporting
    */
    error_reporting( E_ALL & ~E_NOTICE & ~E_WARNING & ~E_DEPRECATED & ~E_USER_DEPRECATED );
    Plugin Contributor Justin McElhaney

    (@jmcelhaney)

    @drlightman @pavelvisualcomposer @sdsweets @kerfred @cedriccharles @kenbeldeniza @dkomando @afreshup @philraymond @rawthey
    Can you update to version 3.4.26 that was just released and contains the fix for this error.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Deprecated: Cannot use “parent” when current class scope has no parent’ is closed to new replies.