Skip to content

Commit

Permalink
clean value and log after concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
ignacioalles committed Jun 3, 2024
1 parent 4384afa commit 1fe7671
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Controller/ErnParserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,6 @@ private function listPossibleFunctionNames($prefix, $tag) {
* @param string $value Value to set
*/
private function setCurrentElement($value) {
$value_clean = trim($value);
$this->log($value_clean . ": " . implode("->", array_keys($this->pile)));

// Use last element in pile
$keys = array_keys($this->pile);

Expand All @@ -452,8 +449,9 @@ private function setCurrentElement($value) {
// xml_parser is known to split values when encountering multibyte chars and call the character_data_handler multiple times
if (!empty($this->lastElement) && $this->lastElement[0] === $elem && $this->lastElement[1] === $tag) {
$value = $this->lastElement[2] . $value;
$value_clean = trim($value);
}
$value_clean = trim($value);
$this->log($value_clean . ": " . implode("->", array_keys($this->pile)));
[$func_name, $elem] = $this->getValidFunctionName("set", $tag, $elem);

// It's possible we're trying to set a text but it's expecting an
Expand Down

0 comments on commit 1fe7671

Please sign in to comment.