ConfigDiff: more context, fix diff with empty
fixes #12262 fixes #12263
This commit is contained in:
parent
ce1c6f3099
commit
7655ad451a
|
@ -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,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue