diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig/Writer/PhpFormatter.php b/lib/internal/Magento/Framework/App/DeploymentConfig/Writer/PhpFormatter.php index d5a89c56b689f..4ae1bca2fefba 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig/Writer/PhpFormatter.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig/Writer/PhpFormatter.php @@ -18,10 +18,11 @@ class PhpFormatter implements FormatterInterface /** * Format deployment configuration. + * * If $comments is present, each item will be added * as comment to the corresponding section * - * {@inheritdoc} + * @inheritdoc */ public function format($data, array $comments = []) { @@ -71,6 +72,8 @@ private function formatData($data, $comments = [], $prefix = ' ') } /** + * Format generated config files using the short array syntax. + * * If variable to export is an array, format with the php >= 5.4 short array syntax. Otherwise use * default var_export functionality. * @@ -80,7 +83,9 @@ private function formatData($data, $comments = [], $prefix = ' ') */ private function varExportShort($var, int $depth = 0) { - if (!is_array($var)) { + if (null === $var) { + return 'null'; + } elseif (!is_array($var)) { return var_export($var, true); }