Jump to content

Prestashop Validation Issue


Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...