Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug where arrays are not null but empty, causing bad output #129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Core/ModuleStateFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,14 +368,14 @@ protected function _addModuleVersion($sModuleVersion, $sModuleId)
*/
protected function diff($array1, $array2)
{
if ($array1 === null) {
if ($array2 === null) {
if ($array1 === null || empty($array1)) {
if ($array2 === null || empty($array1)) {
return false; //indicate no diff
}
return $array2; //full array2 is new
}
if ($array2 === null) {
//indicate that diff is there (so return a true value) but everthing should be droped
//indicate that diff is there (so return a true value) but everything should be dropped
return 'null';
}
$array_diff_assoc1 = @array_diff_assoc($array1, $array2);
Expand Down