Asked  1 Year ago    Answers:  5   Viewed   11 times

I am getting Notice: Trying to get property of non-object at:

$var = trim($article->find('span[id$=qty]', 0)->innertext);

$article is a simple_html_dom() object.



Maybe span[id$=qty] evaluates to null; means: no node was found.

Saturday, May 29, 2021

The AngularJS is not sending any Object instead it passes the GET element.

Just access the Value by simply using $_GET['uid']

Thursday, April 1, 2021

Your getPageData() method returns a numerically indexed array at the 'results' index, not an object. This means $results['pages'] contains a numerically indexed array, not an object. var_dump() it and check it out.

You likely need to do something like:

$template = $results['pages'][0]->pagetemplate;
Saturday, May 29, 2021

As I see there is no way to do that at the moment. It should be edited by author of this script or by some other developer/s willing to continue the development of this project. Don't know does the license allow it or not.

Saturday, May 29, 2021

No, simple html dom doesn't do dom manipulation. With phpquery though you can do:

$doc->find('head')->append('<script src="foo"></script>');
Friday, November 12, 2021
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :