$data['new'] is of type app rather than array

Discussion in 'Developers' Forum' started by MaddinXx, Mar 29, 2013.

  1. MaddinXx

    MaddinXx HowtoForge Supporter

    Hi there

    I'm currently highly investigating to get my Nginx reverse proxy plugin to work with 3.0.5.2 - but I'm just not able to get it to.

    I've tried as much as possible, but newest error is:

    Code:
    PHP Fatal error:  Cannot use object of type app as array in /usr/local/ispconfig/server/plugins-available/nginx_reverse_proxy_plugin.inc.php on line 92
    which is here: https://github.com/Rackster/ispconf...ilable/nginx_reverse_proxy_plugin.inc.php#L92

    therefor, the $data variable isn't an array but of type app object (holding the whole config etc.)

    Is this a bug, new behavior or my fault?

    Thanks!
     
  2. till

    till Super Moderator

    This is neither a bug nor a new bahaviour as it works with all other plugins like before. So there must be a issue in the code of that plugin
     
  3. MaddinXx

    MaddinXx HowtoForge Supporter

    Hi till

    That's what I thought :(
    You have an idea what could be wrong?

    I mean basically line 74-92 is nothing special, nothing is done with $data nor with $app.

    On the other hand, could it be that it's not a fault of the plugin itself but that my ISPConfig install is kind of messed up?

    Thx :)
     
  4. till

    till Super Moderator

    My guess is that the sql query does not return a result which results in this error. You should try to echo the sql query so that you see the exact query string and also output $tmp with e.g. print_r($tmp);
     
  5. MaddinXx

    MaddinXx HowtoForge Supporter

    Thank you till, I was able to fix it. There was a problem with the helper methods (vhost_, cert_) that caused the problem :)

    It was new in 3.0.5.2 since I moved separate helper files within the main plugin :)
     

Share This Page