Page 1 of 1

Trying to get property of non-object

Posted: Tue Feb 14, 2012 2:14 pm
by iou2
Hello, I am new here so please forgive if I am posting in the wrong thread.
Anyway, I am dedicated to have my osCommerce error free. I have been working alone for quite some time on this.
One of my last errors is this: Trying to get property of non-object. The offending line is:
if ($GLOBALS[$module]->tax_class > 0) {

I have tried things like if isset(($GLOBALS[$module]->tax_class > 0)) {

And never fixed it. How should it be?

Kind regards from Sweden
Sara
:?

Re: Trying to get property of non-object

Posted: Tue Feb 14, 2012 3:44 pm
by Celauran
$GLOBALS is an array, not an object.

Re: Trying to get property of non-object

Posted: Wed Feb 15, 2012 7:04 am
by iou2
Thanks for your answer Celauran, appreciated :)
Yes, truly so. I changed the line to read:

if (isset($GLOBALS[$module]->tax_class)) {

Now it works as intended.
If you would like to see my dev.site here it is: http://www.u2commerce.com
Its bugfree, fully validated: html, css, sql, php and the javascripts I've developed.
Next step is to remove any use of jquery... which is veeeeery buggy :(

Still, I have things to be done, before my vision is fully accomplished.

Sara