Commit 37869557 authored by Laurent's avatar Laurent

Merge branch 'fix_nesting_level' into 'master'

Fix nesting level

See merge request !29
parents 0205dd9f 9965fdb5
Pipeline #10837 passed with stage
in 20 seconds
......@@ -618,7 +618,7 @@ abstract class Storm_Model_Abstract {
$has_many_attributes = (array)$this->_has_many_attributes[$field];
$has_many_attributes_in_db = (array)$this->_has_many_attributes_in_db[$field];
$dependents_to_delete = $this->_array_diff(
$dependents_to_delete = array_diff(
$has_many_attributes_in_db,
$has_many_attributes
);
......@@ -635,25 +635,6 @@ abstract class Storm_Model_Abstract {
return $this;
}
/**
* @param array $array1
* @param array $array2
* @return array
* @todo why not using real array_diff ??
*/
protected function _array_diff(Array &$array1, Array &$array2) {
$diff = array();
foreach($array1 as $element) {
if (! in_array($element, $array2)) {
$diff []= $element;
}
}
return $diff;
}
/**
* Main purpose is to setup generic getters and setters:
......
Subproject commit eb090d1e732fa94a56cc5acabf3f4d74c3431eb4
Subproject commit 5f3536b8056ba98008029edbe4b630422631b097
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment