emrag Posted May 10, 2011 Share Posted May 10, 2011 actually this is not a bug but i think you might want to look. it took 1 hour to figure out what s wrong for me while creating a custom server module if you create a variable outside of any function, which's name is "$result", then you will get only one server's details in "admin/configservers.php" page in same server type, even though there's more than one. modules/servers/test/test.php <?php $result = mysql_query('my own sql query'); function test_ConfigOptions(){ } ?> in this scenerio if you add more than 1 server which's type "test", my $result variable overwrite whmc's core $result variable and system cant list other servers' details. may be you want to give an unique name to your $result variable(like $result_whmcscore) or add a note to module documentation. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted May 10, 2011 Share Posted May 10, 2011 of course it won't be available within the function, you will either have to pass the var to the function or make the var global within the function. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.