waqarlashari Posted January 26, 2016 Share Posted January 26, 2016 I am new to prestashop, currently I am working on module validating. I have almost removed all errors and warnings, except this one A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 21 and the first side effect is on line 18. if (!defined('_PS_VERSION_')) { exit; } class AdminConfigController extends ModuleAdminController { has anybody idea what can be done? Link to comment Share on other sites More sharing options...
bellini13 Posted January 26, 2016 Share Posted January 26, 2016 any particular reason you have this code? typically the only thing you would have above the class declaration would be an open php tag and some comments. if (!defined('_PS_VERSION_')) { exit; } Link to comment Share on other sites More sharing options...
waqarlashari Posted January 28, 2016 Author Share Posted January 28, 2016 thanks for your reply, I thought it was a requirement to put the code in every file, in order to prevent people from accessing directory, like www.abc.com/modules/mymodule/adminconfig.php. I dont want to remove the code, it might get my module rejected by validation team. please confirm, if I remove these lines from my code it wont create some hindrance. Link to comment Share on other sites More sharing options...
bellini13 Posted January 28, 2016 Share Posted January 28, 2016 then ignore the validator warning and submit the module and see what happens. or remove the lines of code from the module and try to access it from a browser and see what happens... have you tried to remove the blank line on line 17 to see what effect that has? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now