RuntimeException (500)
Failed to read /home3/ensijamc/public_html/wp-content/themes/g5_news/custom/config/left_sidebar/layout.yaml: Unexpected characters near "http://ensijam.com/category/articles/diplomacy/"><span>سیاست و امنیت</span></a></div>\n[wonderplugin_carousel id=\"2\"]"" at line 103 (near "html: "<div class=\"g-title\"><a href="http://ensijam.com/category/articles/diplomacy/"><span>سیاست و امنیت</span></a></div>\n[wonderplugin_carousel id=\"2\"]""). RuntimeException thrown with message "Failed to read /home3/ensijamc/public_html/wp-content/themes/g5_news/custom/config/left_sidebar/layout.yaml: Unexpected characters near "http://ensijam.com/category/articles/diplomacy/"><span>سیاست و امنیت</span></a></div>\n[wonderplugin_carousel id=\"2\"]"" at line 103 (near "html: "<div class=\"g-title\"><a href="http://ensijam.com/category/articles/diplomacy/"><span>سیاست و امنیت</span></a></div>\n[wonderplugin_carousel id=\"2\"]"")." Stacktrace: #29 RuntimeException in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/rockettheme/toolbox/File/src/File.php:299 #28 Symfony\Component\Yaml\Exception\ParseException in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Inline.php:76 #27 Symfony\Component\Yaml\Inline:parse in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Parser.php:534 #26 Symfony\Component\Yaml\Parser:parseValue in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Parser.php:256 #25 Symfony\Component\Yaml\Parser:doParse in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Parser.php:318 #24 Symfony\Component\Yaml\Parser:parseBlock in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Parser.php:248 #23 Symfony\Component\Yaml\Parser:doParse in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Parser.php:318 #22 Symfony\Component\Yaml\Parser:parseBlock in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Parser.php:248 #21 Symfony\Component\Yaml\Parser:doParse in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Parser.php:318 #20 Symfony\Component\Yaml\Parser:parseBlock in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Parser.php:248 #19 Symfony\Component\Yaml\Parser:doParse in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Parser.php:80 #18 Symfony\Component\Yaml\Parser:parse in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/symfony/yaml/Yaml.php:65 #17 Symfony\Component\Yaml\Yaml:parse in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/rockettheme/toolbox/File/src/YamlFile.php:82 #16 RocketTheme\Toolbox\File\YamlFile:decode in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/rockettheme/toolbox/File/src/File.php:297 #15 RocketTheme\Toolbox\File\File:content in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Component/File/CompiledFile.php:127 #14 Gantry\Component\File\CompiledYamlFile:content in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Component/Config/CompiledConfig.php:113 #13 Gantry\Component\Config\CompiledConfig:loadFile in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Component/Config/CompiledBase.php:169 #12 Gantry\Component\Config\CompiledBase:loadFiles in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Component/Config/CompiledBase.php:108 #11 Gantry\Component\Config\CompiledBase:load in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Component/Config/CompiledConfig.php:79 #10 Gantry\Component\Config\CompiledConfig:load in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Services/ConfigServiceProvider.php:104 #9 Gantry\Framework\Services\ConfigServiceProvider:load in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Services/ConfigServiceProvider.php:49 #8 Gantry\Framework\Services\ConfigServiceProvider:Gantry\Framework\Services\{closure} in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/vendor/pimple/pimple/src/Pimple/Container.php:113 #7 Pimple\Container:offsetGet in /home3/ensijamc/public_html/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:223 #6 Gantry\Framework\Theme:disable_wpautop in /home3/ensijamc/public_html/wp-includes/class-wp-hook.php:298 #5 call_user_func_array in /home3/ensijamc/public_html/wp-includes/class-wp-hook.php:298 #4 WP_Hook:apply_filters in /home3/ensijamc/public_html/wp-includes/class-wp-hook.php:323 #3 WP_Hook:do_action in /home3/ensijamc/public_html/wp-includes/plugin.php:453 #2 do_action in /home3/ensijamc/public_html/wp-includes/template-loader.php:12 #1 require_once in /home3/ensijamc/public_html/wp-blog-header.php:19 #0 require in /home3/ensijamc/public_html/index.php:17
Stack frames (30)
29
RuntimeException
/
vendor
/
rockettheme
/
toolbox
/
File
/
src
/
File.php
299
28
Symfony
\
Component
\
Yaml
\
Exception
\
ParseException
/
vendor
/
symfony
/
yaml
/
Inline.php
76
27
Symfony
\
Component
\
Yaml
\
Inline
parse
/
vendor
/
symfony
/
yaml
/
Parser.php
534
26
Symfony
\
Component
\
Yaml
\
Parser
parseValue
/
vendor
/
symfony
/
yaml
/
Parser.php
256
25
Symfony
\
Component
\
Yaml
\
Parser
doParse
/
vendor
/
symfony
/
yaml
/
Parser.php
318
24
Symfony
\
Component
\
Yaml
\
Parser
parseBlock
/
vendor
/
symfony
/
yaml
/
Parser.php
248
23
Symfony
\
Component
\
Yaml
\
Parser
doParse
/
vendor
/
symfony
/
yaml
/
Parser.php
318
22
Symfony
\
Component
\
Yaml
\
Parser
parseBlock
/
vendor
/
symfony
/
yaml
/
Parser.php
248
21
Symfony
\
Component
\
Yaml
\
Parser
doParse
/
vendor
/
symfony
/
yaml
/
Parser.php
318
20
Symfony
\
Component
\
Yaml
\
Parser
parseBlock
/
vendor
/
symfony
/
yaml
/
Parser.php
248
19
Symfony
\
Component
\
Yaml
\
Parser
doParse
/
vendor
/
symfony
/
yaml
/
Parser.php
80
18
Symfony
\
Component
\
Yaml
\
Parser
parse
/
vendor
/
symfony
/
yaml
/
Yaml.php
65
17
Symfony
\
Component
\
Yaml
\
Yaml
parse
/
vendor
/
rockettheme
/
toolbox
/
File
/
src
/
YamlFile.php
82
16
RocketTheme
\
Toolbox
\
File
\
YamlFile
decode
/
vendor
/
rockettheme
/
toolbox
/
File
/
src
/
File.php
297
15
RocketTheme
\
Toolbox
\
File
\
File
content
/
classes
/
Gantry
/
Component
/
File
/
CompiledFile.php
127
14
Gantry
\
Component
\
File
\
CompiledYamlFile
content
/
classes
/
Gantry
/
Component
/
Config
/
CompiledConfig.php
113
13
Gantry
\
Component
\
Config
\
CompiledConfig
loadFile
/
classes
/
Gantry
/
Component
/
Config
/
CompiledBase.php
169
12
Gantry
\
Component
\
Config
\
CompiledBase
loadFiles
/
classes
/
Gantry
/
Component
/
Config
/
CompiledBase.php
108
11
Gantry
\
Component
\
Config
\
CompiledBase
load
/
classes
/
Gantry
/
Component
/
Config
/
CompiledConfig.php
79
10
Gantry
\
Component
\
Config
\
CompiledConfig
load
/
classes
/
Gantry
/
Framework
/
Services
/
ConfigServiceProvider.php
104
9
Gantry
\
Framework
\
Services
\
ConfigServiceProvider
load
/
classes
/
Gantry
/
Framework
/
Services
/
ConfigServiceProvider.php
49
8
Gantry
\
Framework
\
Services
\
ConfigServiceProvider
Gantry
\
Framework
\
Services
\
{closure}
/
vendor
/
pimple
/
pimple
/
src
/
Pimple
/
Container.php
113
7
Pimple
\
Container
offsetGet
/
classes
/
Gantry
/
Framework
/
Theme.php
223
6
Gantry
\
Framework
\
Theme
disable_wpautop
/
home3
/
ensijamc
/
public_html
/
wp-includes
/
class-wp-hook.php
298
5
call_user_func_array
/
home3
/
ensijamc
/
public_html
/
wp-includes
/
class-wp-hook.php
298
4
WP_Hook
apply_filters
/
home3
/
ensijamc
/
public_html
/
wp-includes
/
class-wp-hook.php
323
3
WP_Hook
do_action
/
home3
/
ensijamc
/
public_html
/
wp-includes
/
plugin.php
453
2
do_action
/
home3
/
ensijamc
/
public_html
/
wp-includes
/
template-loader.php
12
1
require_once
/
home3
/
ensijamc
/
public_html
/
wp-blog-header.php
19
0
require
/
home3
/
ensijamc
/
public_html
/
index.php
17
    /**
     * Get/set parsed file contents.
     *
     * @param mixed $var
     * @return string|array
     */
    public function content($var = null)
    {
        if ($var !== null) {
            $this->content = $this->check($var);
 
            // Update RAW, too.
            $this->raw = $this->encode($this->content);
 
        } elseif ($this->content === null) {
            // Decode RAW file.
            try {
                $this->content = $this->decode($this->raw());
            } catch (\Exception $e) {
                throw new \RuntimeException(sprintf('Failed to read %s: %s', $this->filename, $e->getMessage()), 500, $e);
            }
        }
 
        return $this->content;
    }
 
    /**
     * Save file.
     *
     * @param  mixed  $data  Optional data to be saved, usually array.
     * @throws \RuntimeException
     */
    public function save($data = null)
    {
        if ($data !== null) {
            $this->content($data);
        }
 
        if (!$this->locked) {
            // Obtain blocking lock or fail.
            mb_internal_encoding('ASCII');
        }
 
        $i = 0;
        switch ($value[0]) {
            case '[':
                $result = self::parseSequence($value, $i, $references);
                ++$i;
                break;
            case '{':
                $result = self::parseMapping($value, $i, $references);
                ++$i;
                break;
            default:
                $result = self::parseScalar($value, null, array('"', "'"), $i, true, $references);
        }
 
        // some comments are allowed at the end
        if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) {
            throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)));
        }
 
        if (isset($mbEncoding)) {
            mb_internal_encoding($mbEncoding);
        }
 
        return $result;
    }
 
    /**
     * Dumps a given PHP variable to a YAML string.
     *
     * @param mixed $value                  The PHP variable to convert
     * @param bool  $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
     * @param bool  $objectSupport          true if object support is enabled, false otherwise
     *
     * @return string The YAML string representing the PHP value
     *
     * @throws DumpException When trying to dump PHP resource
     */
Exception message: Unexpected characters near "http://ensijam.com/category/articles/diplomacy/&quot;><span>سیاست و امنیت</span></a></div>\n[wonderplugin_carousel id=\"2\"]"" at line 103 (near "html: "<div class=\"g-title\"><a href="http://ensijam.com/category/articles/diplomacy/&quot;><span>سیاست و امنیت</span></a></div>\n[wonderplugin_carousel id=\"2\"]"").
                $value = substr($value, 1, $pos - 2);
            } else {
                $value = substr($value, 1);
            }
 
            if (!array_key_exists($value, $this->refs)) {
                throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine);
            }
 
            return $this->refs[$value];
        }
 
        if (self::preg_match('/^'.self::BLOCK_SCALAR_HEADER_PATTERN.'$/', $value, $matches)) {
            $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : '';
 
            return $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs($modifiers));
        }
 
        try {
            $parsedValue = Inline::parse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap, $this->refs);
 
            if ('mapping' === $context && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) {
                @trigger_error(sprintf('Using a colon in the unquoted mapping value "%s" in line %d is deprecated since Symfony 2.8 and will throw a ParseException in 3.0.', $value, $this->getRealCurrentLineNb() + 1), E_USER_DEPRECATED);
 
                // to be thrown in 3.0
                // throw new ParseException('A colon cannot be used in an unquoted mapping value.');
            }
 
            return $parsedValue;
        } catch (ParseException $e) {
            $e->setParsedLine($this->getRealCurrentLineNb() + 1);
            $e->setSnippet($this->currentLine);
 
            throw $e;
        }
    }
 
    /**
     * Parses a block scalar.
     *
                    // Merge keys
                } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) {
                    // hash
                    // if next line is less indented or equal, then it means that the current value is null
                    if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) {
                        // Spec: Keys MUST be unique; first one wins.
                        // But overwriting is allowed when a merge node is used in current block.
                        if ($allowOverwrite || !isset($data[$key])) {
                            $data[$key] = null;
                        }
                    } else {
                        $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap);
                        // Spec: Keys MUST be unique; first one wins.
                        // But overwriting is allowed when a merge node is used in current block.
                        if ($allowOverwrite || !isset($data[$key])) {
                            $data[$key] = $value;
                        }
                    }
                } else {
                    $value = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap, $context);
                    // Spec: Keys MUST be unique; first one wins.
                    // But overwriting is allowed when a merge node is used in current block.
                    if ($allowOverwrite || !isset($data[$key])) {
                        $data[$key] = $value;
                    }
                }
                if ($isRef) {
                    $this->refs[$isRef] = $data[$key];
                }
            } else {
                // multiple documents are not supported
                if ('---' === $this->currentLine) {
                    throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine);
                }
 
                // 1-liner optionally followed by newline(s)
                if (is_string($value) && $this->lines[0] === trim($value)) {
                    try {
                        $value = Inline::parse($this->lines[0], $exceptionOnInvalidType, $objectSupport, $objectForMap, $this->refs);
                    } catch (ParseException $e) {
 
        return empty($data) ? null : $data;
    }
 
    private function parseBlock($offset, $yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap)
    {
        $skippedLineNumbers = $this->skippedLineNumbers;
 
        foreach ($this->locallySkippedLineNumbers as $lineNumber) {
            if ($lineNumber < $offset) {
                continue;
            }
 
            $skippedLineNumbers[] = $lineNumber;
        }
 
        $parser = new self($offset, $this->totalNumberOfLines, $skippedLineNumbers);
        $parser->refs = &$this->refs;
 
        return $parser->doParse($yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap);
    }
 
    /**
     * Returns the current line number (takes the offset into account).
     *
     * @return int The current line number
     */
    private function getRealCurrentLineNb()
    {
        $realCurrentLineNumber = $this->currentLineNb + $this->offset;
 
        foreach ($this->skippedLineNumbers as $skippedLineNumber) {
            if ($skippedLineNumber > $realCurrentLineNumber) {
                break;
            }
 
            ++$realCurrentLineNumber;
        }
 
        return $realCurrentLineNumber;
                        }
                    }
                } elseif (isset($values['value']) && self::preg_match('#^&(?P<ref>[^ ]+) *(?P<value>.*)#u', $values['value'], $matches)) {
                    $isRef = $matches['ref'];
                    $values['value'] = $matches['value'];
                }
 
                if ($mergeNode) {
                    // Merge keys
                } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) {
                    // hash
                    // if next line is less indented or equal, then it means that the current value is null
                    if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) {
                        // Spec: Keys MUST be unique; first one wins.
                        // But overwriting is allowed when a merge node is used in current block.
                        if ($allowOverwrite || !isset($data[$key])) {
                            $data[$key] = null;
                        }
                    } else {
                        $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap);
                        // Spec: Keys MUST be unique; first one wins.
                        // But overwriting is allowed when a merge node is used in current block.
                        if ($allowOverwrite || !isset($data[$key])) {
                            $data[$key] = $value;
                        }
                    }
                } else {
                    $value = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap, $context);
                    // Spec: Keys MUST be unique; first one wins.
                    // But overwriting is allowed when a merge node is used in current block.
                    if ($allowOverwrite || !isset($data[$key])) {
                        $data[$key] = $value;
                    }
                }
                if ($isRef) {
                    $this->refs[$isRef] = $data[$key];
                }
            } else {
                // multiple documents are not supported
                if ('---' === $this->currentLine) {
 
        return empty($data) ? null : $data;
    }
 
    private function parseBlock($offset, $yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap)
    {
        $skippedLineNumbers = $this->skippedLineNumbers;
 
        foreach ($this->locallySkippedLineNumbers as $lineNumber) {
            if ($lineNumber < $offset) {
                continue;
            }
 
            $skippedLineNumbers[] = $lineNumber;
        }
 
        $parser = new self($offset, $this->totalNumberOfLines, $skippedLineNumbers);
        $parser->refs = &$this->refs;
 
        return $parser->doParse($yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap);
    }
 
    /**
     * Returns the current line number (takes the offset into account).
     *
     * @return int The current line number
     */
    private function getRealCurrentLineNb()
    {
        $realCurrentLineNumber = $this->currentLineNb + $this->offset;
 
        foreach ($this->skippedLineNumbers as $skippedLineNumber) {
            if ($skippedLineNumber > $realCurrentLineNumber) {
                break;
            }
 
            ++$realCurrentLineNumber;
        }
 
        return $realCurrentLineNumber;
                        }
                    }
                } elseif (isset($values['value']) && self::preg_match('#^&(?P<ref>[^ ]+) *(?P<value>.*)#u', $values['value'], $matches)) {
                    $isRef = $matches['ref'];
                    $values['value'] = $matches['value'];
                }
 
                if ($mergeNode) {
                    // Merge keys
                } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) {
                    // hash
                    // if next line is less indented or equal, then it means that the current value is null
                    if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) {
                        // Spec: Keys MUST be unique; first one wins.
                        // But overwriting is allowed when a merge node is used in current block.
                        if ($allowOverwrite || !isset($data[$key])) {
                            $data[$key] = null;
                        }
                    } else {
                        $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap);
                        // Spec: Keys MUST be unique; first one wins.
                        // But overwriting is allowed when a merge node is used in current block.
                        if ($allowOverwrite || !isset($data[$key])) {
                            $data[$key] = $value;
                        }
                    }
                } else {
                    $value = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap, $context);
                    // Spec: Keys MUST be unique; first one wins.
                    // But overwriting is allowed when a merge node is used in current block.
                    if ($allowOverwrite || !isset($data[$key])) {
                        $data[$key] = $value;
                    }
                }
                if ($isRef) {
                    $this->refs[$isRef] = $data[$key];
                }
            } else {
                // multiple documents are not supported
                if ('---' === $this->currentLine) {
 
        return empty($data) ? null : $data;
    }
 
    private function parseBlock($offset, $yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap)
    {
        $skippedLineNumbers = $this->skippedLineNumbers;
 
        foreach ($this->locallySkippedLineNumbers as $lineNumber) {
            if ($lineNumber < $offset) {
                continue;
            }
 
            $skippedLineNumbers[] = $lineNumber;
        }
 
        $parser = new self($offset, $this->totalNumberOfLines, $skippedLineNumbers);
        $parser->refs = &$this->refs;
 
        return $parser->doParse($yaml, $exceptionOnInvalidType, $objectSupport, $objectForMap);
    }
 
    /**
     * Returns the current line number (takes the offset into account).
     *
     * @return int The current line number
     */
    private function getRealCurrentLineNb()
    {
        $realCurrentLineNumber = $this->currentLineNb + $this->offset;
 
        foreach ($this->skippedLineNumbers as $skippedLineNumber) {
            if ($skippedLineNumber > $realCurrentLineNumber) {
                break;
            }
 
            ++$realCurrentLineNumber;
        }
 
        return $realCurrentLineNumber;
                        }
                    }
                } elseif (isset($values['value']) && self::preg_match('#^&(?P<ref>[^ ]+) *(?P<value>.*)#u', $values['value'], $matches)) {
                    $isRef = $matches['ref'];
                    $values['value'] = $matches['value'];
                }
 
                if ($mergeNode) {
                    // Merge keys
                } elseif (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) {
                    // hash
                    // if next line is less indented or equal, then it means that the current value is null
                    if (!$this->isNextLineIndented() && !$this->isNextLineUnIndentedCollection()) {
                        // Spec: Keys MUST be unique; first one wins.
                        // But overwriting is allowed when a merge node is used in current block.
                        if ($allowOverwrite || !isset($data[$key])) {
                            $data[$key] = null;
                        }
                    } else {
                        $value = $this->parseBlock($this->getRealCurrentLineNb() + 1, $this->getNextEmbedBlock(), $exceptionOnInvalidType, $objectSupport, $objectForMap);
                        // Spec: Keys MUST be unique; first one wins.
                        // But overwriting is allowed when a merge node is used in current block.
                        if ($allowOverwrite || !isset($data[$key])) {
                            $data[$key] = $value;
                        }
                    }
                } else {
                    $value = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap, $context);
                    // Spec: Keys MUST be unique; first one wins.
                    // But overwriting is allowed when a merge node is used in current block.
                    if ($allowOverwrite || !isset($data[$key])) {
                        $data[$key] = $value;
                    }
                }
                if ($isRef) {
                    $this->refs[$isRef] = $data[$key];
                }
            } else {
                // multiple documents are not supported
                if ('---' === $this->currentLine) {
     */
    public function parse($value, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false)
    {
        if (false === preg_match('//u', $value)) {
            throw new ParseException('The YAML value does not appear to be valid UTF-8.');
        }
 
        $this->refs = array();
 
        $mbEncoding = null;
        $e = null;
        $data = null;
 
        if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) {
            $mbEncoding = mb_internal_encoding();
            mb_internal_encoding('UTF-8');
        }
 
        try {
            $data = $this->doParse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap);
        } catch (\Exception $e) {
        } catch (\Throwable $e) {
        }
 
        if (null !== $mbEncoding) {
            mb_internal_encoding($mbEncoding);
        }
 
        $this->lines = array();
        $this->currentLine = '';
        $this->refs = array();
        $this->skippedLineNumbers = array();
        $this->locallySkippedLineNumbers = array();
 
        if (null !== $e) {
            throw $e;
        }
 
        return $data;
    }
     */
    public static function parse($input, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false)
    {
        // if input is a file, process it
        $file = '';
        if (strpos($input, "\n") === false && is_file($input)) {
            @trigger_error('The ability to pass file names to the '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead.', E_USER_DEPRECATED);
 
            if (false === is_readable($input)) {
                throw new ParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input));
            }
 
            $file = $input;
            $input = file_get_contents($file);
        }
 
        $yaml = new Parser();
 
        try {
            return $yaml->parse($input, $exceptionOnInvalidType, $objectSupport, $objectForMap);
        } catch (ParseException $e) {
            if ($file) {
                $e->setParsedFile($file);
            }
 
            throw $e;
        }
    }
 
    /**
     * Dumps a PHP value to a YAML string.
     *
     * The dump method, when supplied with an array, will do its best
     * to convert the array into friendly YAML.
     *
     * @param mixed $input                  The PHP value
     * @param int   $inline                 The level where you switch to inline YAML
     * @param int   $indent                 The amount of spaces to use for indentation of nested nodes
     * @param bool  $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
     * @param bool  $objectSupport          true if object support is enabled, false otherwise
    {
        $data = false;
 
        // Try native PECL YAML PHP extension first if available.
        if ($this->setting('native') && function_exists('yaml_parse')) {
            if ($this->setting('compat', true)) {
                // Fix illegal @ start character.
                $data = preg_replace('/ (@[\w\.\-]*)/', " '\${1}'", $var);
            } else {
                $data = $var;
            }
 
            // Safely decode YAML.
            $saved = @ini_get('yaml.decode_php');
            @ini_set('yaml.decode_php', 0);
            $data = @yaml_parse($data);
            @ini_set('yaml.decode_php', $saved);
        }
 
        return $data !== false ? $data : (array) YamlParser::parse($var);
    }
}
 
    }
 
    /**
     * Get/set parsed file contents.
     *
     * @param mixed $var
     * @return string|array
     */
    public function content($var = null)
    {
        if ($var !== null) {
            $this->content = $this->check($var);
 
            // Update RAW, too.
            $this->raw = $this->encode($this->content);
 
        } elseif ($this->content === null) {
            // Decode RAW file.
            try {
                $this->content = $this->decode($this->raw());
            } catch (\Exception $e) {
                throw new \RuntimeException(sprintf('Failed to read %s: %s', $this->filename, $e->getMessage()), 500, $e);
            }
        }
 
        return $this->content;
    }
 
    /**
     * Save file.
     *
     * @param  mixed  $data  Optional data to be saved, usually array.
     * @throws \RuntimeException
     */
    public function save($data = null)
    {
        if ($data !== null) {
            $this->content($data);
        }
 
                        // Compile cached file into bytecode cache
                        if (function_exists('opcache_invalidate')) {
                            // Silence error in case if `opcache.restrict_api` directive is set.
                            @opcache_invalidate($file->filename(), true);
                        } elseif (function_exists('apc_compile_file')) {
                            // PHP 5.4
                            @apc_compile_file($file->filename());
                        }
                    }
                }
                $file->free();
 
                $this->content = $cache['data'];
            }
 
        } catch (\Exception $e) {
            throw new \RuntimeException(sprintf('Failed to read %s: %s', basename($this->filename), $e->getMessage()), 500, $e);
        }
 
        return parent::content($var);
    }
}
 
        $this->object = new Config($data, $this->callable);
    }
 
    /**
     * Finalize configuration object.
     */
    protected function finalizeObject()
    {
    }
 
    /**
     * Load single configuration file and append it to the correct position.
     *
     * @param  string  $name  Name of the position.
     * @param  string  $filename  File to be loaded.
     */
    protected function loadFile($name, $filename)
    {
        $file = CompiledYamlFile::instance($filename);
        $this->object->join($name, $file->content(), '/');
        $file->free();
    }
}
 
     *
     * @param  string  $name  Name of the position.
     * @param  string  $filename  File to be loaded.
     */
    abstract protected function loadFile($name, $filename);
 
    /**
     * Load and join all configuration files.
     *
     * @return bool
     * @internal
     */
    protected function loadFiles()
    {
        $this->createObject();
 
        $list = array_reverse($this->files);
        foreach ($list as $files) {
            foreach ($files as $name => $item) {
                $this->loadFile($name, $this->path . $item['file']);
            }
        }
 
        $this->finalizeObject();
 
        return true;
    }
 
    /**
     * Load compiled file.
     *
     * @param  string  $filename
     * @return bool
     * @internal
     */
    protected function loadCompiledFile($filename)
    {
        $gantry = Gantry::instance();
 
        /** @var Config $global */
    }
 
    /**
     * Function gets called when cached configuration is saved.
     */
    public function modified() {}
 
    /**
     * Load the configuration.
     *
     * @return mixed
     */
    public function load()
    {
        if ($this->object) {
            return $this->object;
        }
 
        $filename = $this->createFilename();
        if (!$this->loadCompiledFile($filename) && $this->loadFiles()) {
            $this->saveCompiledFile($filename);
        }
 
        return $this->object;
    }
 
    /**
     * Returns checksum from the configuration files.
     *
     * You can set $this->checksum = false to disable this check.
     *
     * @return bool|string
     */
    public function checksum()
    {
        if (!isset($this->checksum)) {
            $this->checksum = md5(json_encode($this->files) . $this->version);
        }
 
        return $this->checksum;
     *
     * @param callable $blueprints
     * @return $this
     */
    public function setBlueprints(callable $blueprints)
    {
        $this->callable = $blueprints;
 
        return $this;
    }
 
    /**
     * @param bool $withDefaults
     * @return mixed
     */
    public function load($withDefaults = false)
    {
        $this->withDefaults = $withDefaults;
 
        return parent::load();
    }
 
    /**
     * Create configuration object.
     *
     * @param  array  $data
     */
    protected function createObject(array $data = [])
    {
        if ($this->withDefaults && empty($data) && is_callable($this->callable)) {
            $blueprints = $this->callable;
            $data = $blueprints()->getDefaults();
        }
 
        $this->object = new Config($data, $this->callable);
    }
 
    /**
     * Finalize configuration object.
     */
        $paths = [];
        foreach ($uris as $uri) {
            $paths = array_merge($paths, $locator->findResources($uri));
        }
 
        // Locate all configuration files to be compiled.
        $files = (new ConfigFileFinder)->locateFiles($paths);
 
        $cache = $locator->findResource('gantry-cache://theme/compiled/config', true, true);
 
        if (!$cache) {
            throw new \RuntimeException('Who just removed Gantry 5 cache folder? Try reloading the page if it fixes the issue');
        }
 
        $compiled = new CompiledConfig($cache, $files, GANTRY5_ROOT);
        $compiled->setBlueprints(function() use ($container) {
            return $container['blueprints'];
        });
 
        $config = $compiled->load($withDefaults);
 
        // Set atom inheritance.
        $atoms = $config->get('page.head.atoms');
        if (is_array($atoms)) {
            $config->set('page.head.atoms', (new Atoms($atoms))->init()->toArray());
        }
 
        return $config;
    }
}
 
 
            $blueprints = static::blueprints($c);
 
            GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer('blueprints');
 
            return $blueprints;
        };
 
        $gantry['config'] = function($c) {
            // Make sure configuration has been set.
            if (!isset($c['configuration'])) {
                throw new \LogicException('Gantry: Please set current configuration before using $gantry["config"]', 500);
            }
 
            GANTRY_DEBUGGER && \Gantry\Debugger::startTimer('config', 'Loading configuration');
 
            // Get the current configuration and lock the value from modification.
            $outline = $c->lock('configuration');
 
            $config = static::load($c, $outline);
 
            GANTRY_DEBUGGER && \Gantry\Debugger::setConfig($config)->stopTimer('config');
 
            return $config;
        };
    }
 
    public static function blueprints(Container $container)
    {
        /** @var UniformResourceLocator $locator */
        $locator = $container['locator'];
 
        $cache = $locator->findResource('gantry-cache://theme/compiled/blueprints', true, true);
 
        $files = [];
        $paths = $locator->findResources('gantry-particles://');
        $files += (new ConfigFileFinder)->setBase('particles')->locateFiles($paths);
        $paths = $locator->findResources('gantry-blueprints://');
        $files += (new ConfigFileFinder)->locateFiles($paths);
 
    {
        if (!isset($this->keys[$id])) {
            throw new \InvalidArgumentException(sprintf('Identifier "%s" is not defined.', $id));
        }
 
        if (
            isset($this->raw[$id])
            || !is_object($this->values[$id])
            || isset($this->protected[$this->values[$id]])
            || !method_exists($this->values[$id], '__invoke')
        ) {
            return $this->values[$id];
        }
 
        if (isset($this->factories[$this->values[$id]])) {
            return $this->values[$id]($this);
        }
 
        $raw = $this->values[$id];
        $val = $this->values[$id] = $raw($this);
        $this->raw[$id] = $raw;
 
        $this->frozen[$id] = true;
 
        return $val;
    }
 
    /**
     * Checks if a parameter or an object is set.
     *
     * @param string $id The unique identifier for the parameter or object
     *
     * @return bool
     */
    public function offsetExists($id)
    {
        return isset($this->keys[$id]);
    }
 
    /**
 
        // Only filter our streams.
        return $gantry['document']->urlFilter($text, true, 0, true);
    }
 
    public function register_post_types()
    {
        //this is where you can register custom post types
    }
 
    public function register_taxonomies()
    {
        //this is where you can register custom taxonomies
    }
 
    public function disable_wpautop()
    {
        $gantry = Gantry::instance();
 
        $wpautop = $gantry['config']->get('content.general.wpautop.enabled', '1');
 
        if($wpautop == '0') {
            remove_filter('the_content', 'wpautop');
            remove_filter('comment_text', 'wpautop');
        }
    }
 
    public function enqueue_scripts()
    {
        $gantry = Gantry::instance();
 
        $gantry['document']->registerAssets();
    }
 
    public function print_styles()
    {
        $styles = Gantry::instance()->styles();
        if ($styles) {
            echo implode("\n    ", $styles) . "\n";
        }
        }
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if( ! $this->doing_action ) {
                    $args[ 0 ] = $value;
                }
 
                // Avoid the array_slice if possible.
                if ( $the_['accepted_args'] == 0 ) {
                    $value = call_user_func_array( $the_['function'], array() );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     * @access public
     *
        }
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if( ! $this->doing_action ) {
                    $args[ 0 ] = $value;
                }
 
                // Avoid the array_slice if possible.
                if ( $the_['accepted_args'] == 0 ) {
                    $value = call_user_func_array( $the_['function'], array() );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     * @access public
     *
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Executes the callback functions hooked on a specific action hook.
     *
     * @since 4.7.0
     * @access public
     *
     * @param mixed $args Arguments to pass to the hook callbacks.
     */
    public function do_action( $args ) {
        $this->doing_action = true;
        $this->apply_filters( '', $args );
 
        // If there are recursive calls to the current action, we haven't finished it until we get to the last one.
        if ( ! $this->nesting_level ) {
            $this->doing_action = false;
        }
    }
 
    /**
     * Processes the functions hooked into the 'all' hook.
     *
     * @since 4.7.0
     * @access public
     *
     * @param array $args Arguments to pass to the hook callbacks. Passed by reference.
     */
    public function do_all_hook( &$args ) {
        $nesting_level = $this->nesting_level++;
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
 
        do {
    }
 
    if ( !isset($wp_filter[$tag]) ) {
        if ( isset($wp_filter['all']) )
            array_pop($wp_current_filter);
        return;
    }
 
    if ( !isset($wp_filter['all']) )
        $wp_current_filter[] = $tag;
 
    $args = array();
    if ( is_array($arg) && 1 == count($arg) && isset($arg[0]) && is_object($arg[0]) ) // array(&$this)
        $args[] =& $arg[0];
    else
        $args[] = $arg;
    for ( $a = 2, $num = func_num_args(); $a < $num; $a++ )
        $args[] = func_get_arg($a);
 
    $wp_filter[ $tag ]->do_action( $args );
 
    array_pop($wp_current_filter);
}
 
/**
 * Retrieve the number of times an action is fired.
 *
 * @since 2.1.0
 *
 * @global array $wp_actions Increments the amount of times action was triggered.
 *
 * @param string $tag The name of the action hook.
 * @return int The number of times action hook $tag is fired.
 */
function did_action($tag) {
    global $wp_actions;
 
    if ( ! isset( $wp_actions[ $tag ] ) )
        return 0;
 
<?php
/**
 * Loads the correct template based on the visitor's url
 * @package WordPress
 */
if ( defined('WP_USE_THEMES') && WP_USE_THEMES )
    /**
     * Fires before determining which template to load.
     *
     * @since 1.5.0
     */
    do_action( 'template_redirect' );
 
/**
 * Filters whether to allow 'HEAD' requests to generate content.
 *
 * Provides a significant performance bump by exiting before the page
 * content loads for 'HEAD' requests. See #14348.
 *
 * @since 3.5.0
 *
 * @param bool $exit Whether to exit without generating any content for 'HEAD' requests. Default true.
 */
if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) )
    exit();
 
// Process feeds and trackbacks even if not using themes.
if ( is_robots() ) :
    /**
     * Fired when the template loader determines a robots.txt request.
     *
     * @since 2.1.0
     */
    do_action( 'do_robots' );
    return;
elseif ( is_feed() ) :
    do_feed();
    return;
elseif ( is_trackback() ) :
    include( ABSPATH . 'wp-trackback.php' );
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( !isset($wp_did_header) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once( dirname(__FILE__) . '/wp-load.php' );
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once( ABSPATH . WPINC . '/template-loader.php' );
 
}
 
<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);
 
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . '/wp-blog-header.php' );
 

Environment & details:

Key Value
start 48
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /editorial/?start=48
DOCUMENT_ROOT /home3/ensijamc/public_html
GATEWAY_INTERFACE CGI/1.1
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING x-gzip, gzip, deflate
HTTP_CONNECTION close
HTTP_HOST ensijam.com
HTTP_USER_AGENT CCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_X_HTTP_PROTO HTTP/1.0
HTTP_X_REAL_IP 54.92.155.160
MAGICK_THREAD_LIMIT 1
PATH /bin:/usr/bin
QUERY_STRING start=48
REDIRECT_MAGICK_THREAD_LIMIT 1
REDIRECT_QUERY_STRING start=48
REDIRECT_STATUS 200
REDIRECT_UNIQUE_ID Wck0EK3@GBAADPzISTMAAADX
REDIRECT_URL /editorial/
REMOTE_ADDR 54.92.155.160
REMOTE_PORT 13641
REQUEST_METHOD GET
SCRIPT_FILENAME /home3/ensijamc/public_html/index.php
SCRIPT_NAME /index.php
SERVER_ADDR 173.254.55.207
SERVER_ADMIN webmaster@ensijam.com
SERVER_NAME ensijam.com
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SIGNATURE
Apache Server at ensijam.com Port 80
UNIQUE_ID Wck0EK3@GBAADPzISTMAAADX
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1506358288.9501
REQUEST_TIME 1506358288
empty
0. Whoops\Handler\PrettyPageHandler