From f4e18a0ae7da0af8ae26f2324a42ace3cbad4bea Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Fri, 22 Jun 2018 13:58:27 +0100 Subject: [PATCH] MDL-62783 XMLDB: Generate PHP with [] arrays --- lib/xmldb/xmldb_index.php | 4 ++-- lib/xmldb/xmldb_key.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/xmldb/xmldb_index.php b/lib/xmldb/xmldb_index.php index e8c82d8f733..72eae495653 100644 --- a/lib/xmldb/xmldb_index.php +++ b/lib/xmldb/xmldb_index.php @@ -291,14 +291,14 @@ class xmldb_index extends xmldb_object { // The fields $indexfields = $this->getFields(); if (!empty($indexfields)) { - $result .= 'array(' . "'". implode("', '", $indexfields) . "')"; + $result .= "['". implode("', '", $indexfields) . "']"; } else { $result .= 'null'; } // Hints $hints = $this->getHints(); if (!empty($hints)) { - $result .= ', array(' . "'". implode("', '", $hints) . "')"; + $result .= ", ['". implode("', '", $hints) . "']"; } // Return result diff --git a/lib/xmldb/xmldb_key.php b/lib/xmldb/xmldb_key.php index 0d47aa036d5..c27ef7135ab 100644 --- a/lib/xmldb/xmldb_key.php +++ b/lib/xmldb/xmldb_key.php @@ -430,7 +430,7 @@ class xmldb_key extends xmldb_object { // The fields $keyfields = $this->getFields(); if (!empty($keyfields)) { - $result .= 'array(' . "'". implode("', '", $keyfields) . "')"; + $result .= "['". implode("', '", $keyfields) . "']"; } else { $result .= 'null'; } @@ -447,7 +447,7 @@ class xmldb_key extends xmldb_object { // The reffields $reffields = $this->getRefFields(); if (!empty($reffields)) { - $result .= 'array(' . "'". implode("', '", $reffields) . "')"; + $result .= "['". implode("', '", $reffields) . "']"; } else { $result .= 'null'; } -- 2.43.0