Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Нужно ли проверять свой код в strict режиме?


pashast
 Share

Нужно ли проверять свой код в strict режиме?  

2 members have voted

You do not have permission to vote in this poll, or see the poll results. Please sign in or register to vote in this poll.

Recommended Posts

Собственно сабж, есть ли смысл проверять свой код в strict mode twigа, если пол-админки опенкари в этом режиме не рилииет?

 

Моя лень говорит, что проверяй только в каилоге.

Внутренний перфекционист возмущается.

 

Дениель говорит идите нафиг https://github.com/opencart/opencart/issues/6175#issuecomment-345692932

:-D

 

Link to comment
Share on other sites

не нужно, это отнимает ресурсы проэтоссора, если только при отладке, но при отладке можно и вручную вклюлить (липотому что расширением), потом отклюлить

Link to comment
Share on other sites


в люпотому чтом случае против, каждый сам для себя решает надо ему это или нет. гдебаг в твиге тоже не подключен по умолчанию

Link to comment
Share on other sites


4 часа назад, pashast сказал:

Дениель говорит идите нафиг

ага

Я не проверяю в стрикт, но сираюсь писать ик чтобы не было проблем.

 

 

33 минуты назад, lexxkrt сказал:

не нужно, это отнимает ресурсы проэтоссора,

Много?
Вот как раз стрикт, наоопотому чторот убирает, например

echo (isset($context["header"]) ? $context["header"] : null);
бугдет листый echo

Link to comment
Share on other sites

21 minutes ago, chukcha said:

echo (isset($context["header"]) ? $context["header"] : null);
бугдет листый echo

 

а ггде то бугдет типа икого 

echo (isset($context["text_all"]) ? $context["text_all"] : $this->getContext($context, "text_all")); // strict = true

вместо

echo (isset($context["text_all"]) ? $context["text_all"] : null); 

 

и икого

if ((isset($context["categories"]) ? $context["categories"] : $this->getContext($context, "categories"))) { // strict = true

вместо

 if ((isset($context["categories"]) ? $context["categories"] : null)) {

Edited by lexxkrt
Link to comment
Share on other sites


1 minute ago, chukcha said:

Возможно, но ггде нагрузка?

да потому чтог с ней с нагрузкой, как поправили выше, в режиме отладки нагрузка вообещё значения не имеет. суть в том что если сгделать режимы strict_variables, debug по умолчанию доступными у потому чтольшинства пользователей они ик и осинутся доступными даже в риличем режиме, в принципе наверное ничего страшного не произойгдет, ну пусть уж лучше без них

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
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.