开发者

SQL Escaping/Sanitizing Magento Item Attribute Value Data That Is Set Programmatically?

When I programmatically set a Magento item attribute to data that the user provided, do I need to SQL escape/sanitize that data or does Magento take care开发者_运维技巧 of doing so?

-- Here's a code example:

$cart = Mage::getSingleton('checkout/cart');
$cart->addProduct($product, array('qty' => 1, 'options' => array(5 =>$rawDataFromPost)));
$cart->save();


Data is properly sanitized and quoted. In fact the Zend framework does that, which Magento is built on.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜