Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validations missing in toXML_low #21

Open
guillaumefortin opened this issue Aug 10, 2023 · 0 comments
Open

Validations missing in toXML_low #21

guillaumefortin opened this issue Aug 10, 2023 · 0 comments

Comments

@guillaumefortin
Copy link

guillaumefortin commented Aug 10, 2023

2 validations are missing in toXML_low():

private function toXML_low($template,$txnType)
{
	$xmlString = "";
	//FIX: This line should be added.
	if( !empty($this->level3data[$txnType]) && is_array($this->level3data[$txnType]) )
	{
		for($x=0;$x<count($this->level3data[$txnType]);$x++)
		{
			if($x>0)
			{
				$xmlString .="</$txnType><$txnType>";
			}
			$keys=array_keys($template);
			for($i=0; $i < count($keys);$i++)
			{
				$tag=$keys[$i];

				if(is_array($template[$keys[$i]]))
				{
					$data=$template[$tag];

					//FIX: should add !is_array
					if( !is_array($this->level3data[$tag]) || !count($this->level3data[$tag]) )
					{
						continue;
					}
					$beginTag="<$tag>";
					$endTag="</$tag>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant