Skip to content

Commit

Permalink
Move array_intersect into return array
Browse files Browse the repository at this point in the history
  • Loading branch information
Saibamen committed Aug 6, 2015
1 parent fd50a5f commit 03fc722
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diff.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function diff_versions($leftContent, $rightContent)
$rightVersion = $matches[1];

return array(
'diff' => $leftVersion == $rightVersion,
'diff' => array_intersect($leftVersion, $rightVersion),
'leftVersion' => $leftVersion,
'rightVersion' => $rightVersion,
);
Expand Down Expand Up @@ -146,7 +146,7 @@ function diff_versions($leftContent, $rightContent)

$array = diff_versions($fileContent1, $fileContent2);

if (array_intersect($array['leftVersion'], $array['rightVersion']))
if ($array['diff'])
{
echo $regex->getPathInfo() .'<br><br>';

Expand Down

0 comments on commit 03fc722

Please sign in to comment.