Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6020289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:32:47+00:00 2026-05-23T03:32:47+00:00

All, I’m using PHPLint to evaluate a PHP script I’m writing, and it returns

  • 0

All,

I’m using PHPLint to evaluate a PHP script I’m writing, and it returns the following error:

“ERROR: property `SimpleXMLElement::$error’ does not exist or not visible”.

The code referred to looks like this:

$this->_xmlResponse = new SimpleXMLElement($resultString);

if (($this->_xmlResponse !== NULL) && ($this->_xmlResponse->error))

And _xmlResponse is a class variable declared like this:

private /*. SimpleXMLElement .*/ $_xmlResponse = NULL;

The way the SimpleXMLElement class works is you refer to an XML element by name using the -> operator. So I’m referring to the “error” element from my SimpleXMLElement object.

I am also getting errors like this one:

ERROR: `->’ operator applied to a value of type mixed

When accessing elements like this:

print ' by ' . htmlentities($status->user->screen_name) . '</h6>';

The code works fine, but PHPLint still gives the errors. I’ve looked through the PHPLint reference manual but I can’t figure out if PHPLint is unable to parse SimpleXMLElement, or if this is really something that is a potential problem. Can anyone explain this PHPLint error? Perhaps there is some type casting I need to do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T03:32:48+00:00Added an answer on May 23, 2026 at 3:32 am

    You’ve brought up two separate issues. First, SimpleXMLElement (as of PHP 5.3.6) has no error attribute. See the documentation here. If you read the constructor documentation you’ll see the correct way to detect an error is to catch an exception thrown by the constructor. The second error is most likely do to $status (or $status->user) having a @mixed PHPDocumentor annotation on it, which is used by PHPLint. Changing the annotation to @object should address your issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All I get is this: An error has occurred in the script on this
All throughout an application wherever error messages (or other user messages) are used I
All, I've got the following code, and looking into ways to improve its readibility
All I need to do is have a form that does this: User enters
All source code hosting services have size limits. I am wondering that does that
All the examples of Silverlight using MVVM use interface named IPropertyChanged. What is the
All I get is an error box saying: Unexpected file format. Everything was going
I am writing a query to fetch results for all the values in a
If I write a python script using only python standard libraries, using Python 2.6
All, What should be the approach to writing a thread safe program. Given a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.