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

Xml parse exception #214

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

droletmarc
Copy link

@droletmarc droletmarc commented Aug 15, 2018

An old closed issue still valid and I've figured out the problem.
here is the issue I'm talking about: #73

WARNING:

  • I've fix it with 2 required php extensions. iconv and mbstring so if you release this fix I think we should have a major release to make sure people using composer will not get problems if they do not have those extensions installed.

The issue is releated to the fact some of the providers do not return the data properly and the xml is not valid.

1- the Windows/Linux issue is probably related to the ^M that appear at the end of each lines (Windows char). I've got this crap from the mlslistings rets server response.
2- I've also receive non UTF-8 char into the xml from the mlslisting server. ex: The copy right sigh that they didn't html entity.

I've test this fix with those rets servers: rebny, mlspin, gamls, fmls and mlslistings

You can test before applying the patch and after with this xml response string that came from the mlslistings rets where the sign ® cause the issue:
<RETS ReplyCode="0" ReplyText="Operation Successful"> <COUNT Records="1" /> <DELIMITER value="09" /> <COLUMNS> NRDSID PrimaryPhone AddressMailingCareOf OldOfficeID AddressMailingPostalCode AddressCityID AddressCareOf IDXYN Aggregation LongName MLS AddressLine1 CorporateLicense MasterOfficeID AddressMailingCounty Status FaxNumber NoOfBranches AddressMailing AddressStreetSuffix OfficeName VOW StateID DesignatedBroker AddressLine2 OtherPhone ContactMember OfficeID AddressMailingStateID AddressCityName BranchNumber Zip AddressStreetName BrokerCode AddressStateCode AddressMailingCityID Type MainOfficeID BrokerAgentID URL EmailAddress OldLastModDt BoardID LastModDt BranchType </COLUMNS> <DATA> 60842 (916) 929-4706 Roger Hackney, REALTOR® 877723528 95825 235 1 Quattro Roger Hackney MetroList 333 University Ave #200 00834701 877723528 Active (916) 929-6531 0 333 University Ave #200 Roger Hackney 5 44353 4592 5 1 95825 01RHCI 235 Real Estate Office / MLS 4592 44353 http://www.campuscommons.net roger@campuscommons.net 2018-07-09T15:22:45 MetroList 2018-07-09T15:28:44 Single/Standalone </DATA> <MAXROWS /> <RETS-STATUS ReplyCode="0" ReplyText="Operation Successful" /> </RETS>

droletmarc added 6 commits July 14, 2017 08:24
  on each rets request.  This file is not used anymore once we get the
  gets server response and it didn't get removed.

- /tmp folder was hardcoded, I've added a way to configure it into the
  configuration of the PHRets.  By default it will be null.
not work if you pass a value (basic or digest) into the
http_authentication.
I've modify the code to be able to pass http_authentication = null when
we set the config.
not work if you pass a value (basic or digest) into the
http_authentication.
I've modify the code to be able to pass http_authentication = null when
we set the config.
    SimpleXmlElement return an error when the content of the string is
not valid UTF-8 chars.  I've make sure the content is UTF-8. other chars
get discarded
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

Successfully merging this pull request may close these issues.

None yet

1 participant