HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   $data['new'] is of type app rather than array (http://www.howtoforge.com/forums/showthread.php?t=61214)

MaddinXx 29th March 2013 16:51

$data['new'] is of type app rather than array
 
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/ispconfi...in.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!

till 2nd April 2013 11:01

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

MaddinXx 2nd April 2013 13:49

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 :)

till 2nd April 2013 14:09

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);

MaddinXx 2nd April 2013 18:31

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 :)


All times are GMT +2. The time now is 21:43.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.