Skip to content

Commit c220fc2

Browse files
committed
Merge pull request #3 from magento-hackathon/fixes
Fixes
2 parents 8cc271a + 3c232c4 commit c220fc2

File tree

1 file changed

+4
-6
lines changed
  • src/app/code/community/Hackathon/PromoCodeMessages/Model

1 file changed

+4
-6
lines changed

src/app/code/community/Hackathon/PromoCodeMessages/Model/Validator.php

+4-6
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ protected function _validateConditions($rule)
238238
$msgs = array_merge($msgs, $this->_processCondition($condition));
239239
}
240240
if (count($msgs) > 0) {
241-
$errorMsgs = $this->_multi_implode('', $msgs);
241+
$errorMsgs = $this->_multiImplode('', $msgs);
242242
Mage::throwException($this->_formatMessage($errorMsgs));
243243
}
244244
}
@@ -329,8 +329,7 @@ protected function _processRule($condition = array())
329329
->setStoreFilter($storeId, false)
330330
->addFieldToFilter('tsv.option_id', array('in' => $value));
331331
if ($collection->getSize() > 0) {
332-
$item = $collection->getFirstItem();
333-
$value = $item->getValue();
332+
$value = $collection->getFirstItem()->getValue();
334333
}
335334
}
336335
}
@@ -359,7 +358,6 @@ protected function _processRule($condition = array())
359358
* Setup a heading for aggregated rule conditions.
360359
*
361360
* @param String $aggregator "any" or "all"
362-
* @param bool $aggregatedOnly False if the heading is in addition to existing error messages
363361
* @return String containing aggregate heading
364362
*/
365363
protected function _createAggregatedHeading($aggregator)
@@ -408,13 +406,13 @@ protected function _formatMessage($message, $params = '', $internalMessage = nul
408406
* @param $array
409407
* @return string
410408
*/
411-
protected function _multi_implode($glue, $array)
409+
protected function _multiImplode($glue, $array)
412410
{
413411
$ret = '';
414412

415413
foreach ($array as $item) {
416414
if (is_array($item)) {
417-
$ret .= $this->_multi_implode($glue, $item) . $glue;
415+
$ret .= $this->_multiImplode($glue, $item) . $glue;
418416
}
419417
else {
420418
$ret .= $item . $glue;

0 commit comments

Comments
 (0)