Jump to content
Sign in to follow this  
Mickey

Errors when submitting Pirep

Recommended Posts

Hi does anyone have any idea how to solve this error? 

 

[17-Feb-2019 16:39:54 UTC] PHP Warning: SimpleXMLElement::addChild() expects parameter 2 to be string, array given in /home/*****/public_html/crew/core/common/CentralData.class.php on line 198

[17-Feb-2019 16:39:55 UTC] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/crew/core/common/CentralData.class.php:198) in /home/*****/public_html/crew/core/modules/kACARSII/kACARSII.php on line 644

Share this post


Link to post
Share on other sites

What version of phpVMS are you using?

What are the contents of line 198 in CentralData.class.php?

What are the contents of line 644 in kACARSII.php?

Share this post


Link to post
Share on other sites

Phpvms 5.5.2

CentralData.class.php

195  # Add any children who might exist...            
196            if(count($children) > 0) {
197                foreach($children as $key => $value) 198{
198                   $child->addChild($key, $value);
199               }
200           }

 

kACARSII.php

 

644       header('Content-type: text/xml');
645      $xml_string = $xml->asXML();
646        echo $xml_string;
647        return;
648    }

Share this post


Link to post
Share on other sites
1 hour ago, ProAvia said:

What version of phpVMS are you using?

What are the contents of line 198 in CentralData.class.php?

What are the contents of line 644 in kACARSII.php?

Phpvms 5.5.2

CentralData.class.php

195  # Add any children who might exist...            
196            if(count($children) > 0) {
197                foreach($children as $key => $value) 198{
198                   $child->addChild($key, $value);
199               }
200           }

 

kACARSII.php

 

644       header('Content-type: text/xml');
645      $xml_string = $xml->asXML();
646        echo $xml_string;
647        return;
648    }

Share this post


Link to post
Share on other sites

For Central.Data.class.php - mine is exactly the same.... except line 197. take out the 198 on that line. Should read

197                foreach($children as $key => $value) {

As for kACARSII.... if you are still having issues, you may want to post on the FS-Products forums (as that program is payware).

Share this post


Link to post
Share on other sites
10 hours ago, ProAvia said:

For Central.Data.class.php - mine is exactly the same.... except line 197. take out the 198 on that line. Should read


197                foreach($children as $key => $value) {

As for kACARSII.... if you are still having issues, you may want to post on the FS-Products forums (as that program is payware).

Amended and still have the issue. Thanks for the reply, I will try the FS-Products Forum :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×