diff --git a/module/VuFind/src/VuFind/ILS/Driver/Innovative.php b/module/VuFind/src/VuFind/ILS/Driver/Innovative.php index 4d9334653a97e0a008e769ae222c80e3b8dc0318..1e2fe71ce84dd149eec96bce52a979b50a69f260 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Innovative.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Innovative.php @@ -176,7 +176,7 @@ class Innovative extends AbstractBase implements // replace non blocking space encodings with a space. $cols[$i] = str_replace(" ", " ", $cols[$i]); // remove html comment tags - $cols[$i] = ereg_replace("<!--([^(-->)]*)-->", "", $cols[$i]); + $cols[$i] = preg_replace("/<!--([^(-->)]*)-->/", "", $cols[$i]); // Remove closing th or td tag, trim whitespace and decode html // entities $cols[$i] = html_entity_decode( diff --git a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php index 3e0fbf1af7c67a00430c2726f5e9b39cb26f1a25..704ebf66c0be99dc213253e67930de5241ccdbe1 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php +++ b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php @@ -1485,7 +1485,7 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf if ($dueDate) { $tmp = $dueDate; $newDueDate = (string)$tmp[0]; - $tmp = split("T", $newDueDate); + $tmp = explode('T', $newDueDate); $splitDate = $tmp[0]; $splitTime = $tmp[1]; $details[$renewId] = [ diff --git a/tests/vufind.php_cs b/tests/vufind.php_cs index 9784b03026237c7c46cb45b861b496f62db1d824..0c17650db1c6ed3f31cc72edba67d8ab7e64aa6f 100644 --- a/tests/vufind.php_cs +++ b/tests/vufind.php_cs @@ -15,6 +15,7 @@ $rules = [ 'concat_space' => ['spacing' => 'one'], 'elseif' => true, 'encoding' => true, + 'ereg_to_preg' => true, 'full_opening_tag' => true, 'function_declaration' => true, 'function_typehint_space' => true, @@ -72,5 +73,6 @@ if (!is_dir($cacheDir)) { return PhpCsFixer\Config::create() ->setCacheFile($cacheDir . '/.code.cache') + ->setRiskyAllowed(true) ->setRules($rules) ->setFinder($finder); diff --git a/tests/vufind_templates.php_cs b/tests/vufind_templates.php_cs index a4db59e505148aa48912181b4df7db9523bb5d82..1fae1b0cea25bca5d6fdf47bea93541533e07250 100644 --- a/tests/vufind_templates.php_cs +++ b/tests/vufind_templates.php_cs @@ -15,6 +15,7 @@ $rules = [ 'concat_space' => ['spacing' => 'one'], 'elseif' => true, 'encoding' => true, + 'ereg_to_preg' => true, //'full_opening_tag' => true, // using full tags is best practice, but it detracts from readability; we should discuss 'function_declaration' => true, 'function_typehint_space' => true, @@ -69,5 +70,6 @@ if (!is_dir($cacheDir)) { return PhpCsFixer\Config::create() ->setCacheFile($cacheDir . '/.template.cache') + ->setRiskyAllowed(true) ->setRules($rules) ->setFinder($finder);