ConfigDiff: more context, fix diff with empty

fixes #12262
fixes #12263
This commit is contained in:
Thomas Gelf 2016-08-01 06:49:39 +00:00
parent ce1c6f3099
commit 7655ad451a
1 changed files with 12 additions and 2 deletions

View File

@ -22,10 +22,20 @@ class ConfigDiff
{
require_once dirname(__DIR__) . '/vendor/php-diff/lib/Diff.php';
$this->a = explode("\n", (string) $a);
$this->b = explode("\n", (string) $b);
if (empty($a)) {
$this->a = array();
} else {
$this->a = explode("\n", (string) $a);
}
if (empty($b)) {
$this->b = array();
} else {
$this->b = explode("\n", (string) $b);
}
$options = array(
'context' => 5,
// 'ignoreWhitespace' => true,
// 'ignoreCase' => true,
);