3

Got these WARNINGS how can I resolve it ?

"include_once" statement detected. File manipulations are discouraged. Concatenating is forbidden.

"require_once" statement detected. File manipulations are discouraged. Concatenating is forbidden.

Code

include_once BP.DS.'app'.DS.'code'.DS.'core'.DS.'Mage'.DS.'Catalog'.DS.'Model'.DS.'Resource'.DS.'Attribute.php';
2

1 Answer 1

3

I'm not sure why you need such include_once in your code.

If the code you're using is in the scope of the Magento software, you can simply do the following whenever you need to deal with that class:

Mage::getResourceModel('catalog/attribute');
4
  • check this example of override inchoo.net/magento/… Nov 29, 2016 at 9:07
  • @QaisarSatti well it is totally different than what you are doing right ? In this example, it's about controller rewrite. In your case, you include a resource model. Nov 29, 2016 at 9:27
  • i know but i can't change it.Is there is any alternative of include_once or require function in magneto? Nov 29, 2016 at 9:30
  • @QaisarSatti why can't you ? in your case, the change is easy as I explained in my answer Nov 29, 2016 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.