Mercurial > hg > cmmr2012-drupal-site
comparison vendor/symfony/yaml/Parser.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
287 if ('<<' === $key && (!isset($values['value']) || !self::preg_match('#^&(?P<ref>[^ ]+)#u', $values['value'], $refMatches))) { | 287 if ('<<' === $key && (!isset($values['value']) || !self::preg_match('#^&(?P<ref>[^ ]+)#u', $values['value'], $refMatches))) { |
288 $mergeNode = true; | 288 $mergeNode = true; |
289 $allowOverwrite = true; | 289 $allowOverwrite = true; |
290 if (isset($values['value'][0]) && '*' === $values['value'][0]) { | 290 if (isset($values['value'][0]) && '*' === $values['value'][0]) { |
291 $refName = substr(rtrim($values['value']), 1); | 291 $refName = substr(rtrim($values['value']), 1); |
292 if (!array_key_exists($refName, $this->refs)) { | 292 if (!\array_key_exists($refName, $this->refs)) { |
293 if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) { | 293 if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) { |
294 throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $refName, $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename); | 294 throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $refName, $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename); |
295 } | 295 } |
296 | 296 |
297 throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); | 297 throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); |
696 $value = substr($value, 1, $pos - 2); | 696 $value = substr($value, 1, $pos - 2); |
697 } else { | 697 } else { |
698 $value = substr($value, 1); | 698 $value = substr($value, 1); |
699 } | 699 } |
700 | 700 |
701 if (!array_key_exists($value, $this->refs)) { | 701 if (!\array_key_exists($value, $this->refs)) { |
702 if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) { | 702 if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) { |
703 throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $value, $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); | 703 throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $value, $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); |
704 } | 704 } |
705 | 705 |
706 throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); | 706 throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); |