• Resolved sanatolii

    (@sanatolii)


    In textarea nfw_options[csp_frontend_data] text:
    <b>Fatal error</b>: Call to undefined function readonly() in <b>/home/moldgres/moldgres.com/docs/wp-content/plugins/ninjafirewall/lib/firewall_policies.php</b> on line <b>919</b><br />

    What is this function? it is not defined anywhere.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Apparently, your WordPress version is too old. This function was introduced in WordPress 4.9.
    You can edit this file: wp-content/plugins/ninjafirewall/lib/utils.php
    Line 20, there’s this code:

    if (! defined( 'NFW_ENGINE_VERSION' ) ) { die( 'Forbidden' ); }
    

    Below, line 21, add this code:

    // For WP <4.9.
    if (! function_exists( 'readonly' ) ) {
       function readonly( $var, $val) {
          if ( $var == $val ) {
             echo " readonly='readonly'";
          }
       }
    }
    
    Thread Starter sanatolii

    (@sanatolii)

    TNX!!! Fixed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘In page Firewall Policies not view button Save Firewall Policies’ is closed to new replies.