Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Redefinition of parameter $options

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #237510
    Ayanize
    Participant

    Hello,

    Can anyone tell me what this error is and how to fix this ?

    Redefinition of parameter $options in ….path…./public/assets/plugins/de-footer-builder/generate-dfb/functions/import.php on line 268

    #237513
    Anonymous
    Inactive

    Sure. It would be helpful if you had posted the code, but it’s possible to make an educated guess.

    If you go to .../public/assets/plugins/de-footer-builder/generate-dfb/functions/import.php and look on line 268, I suspect you’ll see something like:

    function name($options, $options) {
    

    This used to be ok. If you called something like name(1, 2) then $options would simple be assigned the value 2. As of PHP7 you get this error instead.

    #237514
    Ayanize
    Participant

    Thanks for your reply. One of our clients pointed that out. And I guess I figured this out. I am yet to test this on php7 . Still will seek your expert opinion

    Here is the public function

    public function process_imports( $content = true, $options = true, $options = true, $widgets = true) {
    
                if ( $content && !empty( $this->content_demo ) && is_file( $this->content_demo ) ) {
                    $this->set_demo_data( $this->content_demo );
                }
    
                if ( $options && !empty( $this->theme_options_file ) && is_file( $this->theme_options_file ) ) {
                    $this->set_demo_theme_options( $this->theme_options_file );
                }
    
                if ( $options ) {
                    $this->set_demo_menus();
                }
    
                if ( $widgets && !empty( $this->widgets ) && is_file( $this->widgets ) ) {
                    $this->process_widget_import_file( $this->widgets );
                }
    
                do_action( 'radium_import_end');
    
            }
    

    I guess the I need to remove on value here

    $options = true
    
    
    #237515
    Anonymous
    Inactive

    Yep, that’s about it. You’re currently losing the first $options value anyway, so just change the variable name.

    #237516
    Ayanize
    Participant

    thanks a lot Ben :)

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.