Skip to content
Snippets Groups Projects
Commit 32042f1b authored by Demian Katz's avatar Demian Katz
Browse files

Remove deprecated function calls (PHP 7).

parent 1b94c4b2
No related merge requests found
......@@ -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(
......
......@@ -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] = [
......
......@@ -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);
......@@ -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);
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment