Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Fix addProduct method to Order #8

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Fix addProduct method to Order #8

wants to merge 13 commits into from

Conversation

ghassani
Copy link

@ghassani ghassani commented Apr 4, 2014

No description provided.

@@ -69,6 +70,8 @@ public function __set($columnName, $value)
*/
public function addProduct(array $data = array())
{
$products = $this->products;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an empty instantiation check to be safe, and I'll take it: $products = is_null($this->products) ? array() : $this->products;

I would say to use good ole' elvis, but we need to support pre-elvis operators.

@philcali philcali force-pushed the master branch 2 times, most recently from 2c66f44 to dd7b765 Compare March 18, 2015 15:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants