php 5.3 problem

UksusoFF
14 years, 2 months ago
Warning: Attempt to modify property of non-object in /var/wwww/rock63/html/plugins/system/mobilebot.php on line 197
In RSS and generating PDF
forum.joomla.org/viewtopic.php?f=428&t=554752

How can i fix this?
dryabov
14 years, 2 months ago
Try to replace
			unset($GLOBALS['_JRESPONSE']->headers['Content-type']);

at that line by
			if(isset($GLOBALS['_JRESPONSE']))
unset($GLOBALS['_JRESPONSE']->headers['Content-type']);
UksusoFF
14 years, 2 months ago
dryabov wrote:
Try to replace
			unset($GLOBALS['_JRESPONSE']->headers['Content-type']);

at that line by
			if(isset($GLOBALS['_JRESPONSE']))
unset($GLOBALS['_JRESPONSE']->headers['Content-type']);

it is the same =( but longer load
dryabov
14 years, 2 months ago
Sorry, replace by
            if(isset($GLOBALS['_JRESPONSE']->headers['Content-type'])) 
unset($GLOBALS['_JRESPONSE']->headers['Content-type']);
UksusoFF
14 years, 2 months ago
sorry, both variants worked, i'm stupid =)
thanks
dryabov
14 years, 2 months ago
OK, let's combine them together:
			if(isset($GLOBALS['_JRESPONSE']) && isset($GLOBALS['_JRESPONSE']->headers['Content-type']))
unset($GLOBALS['_JRESPONSE']->headers['Content-type']);
 

(tested on real PHP5.3.4 server)
UksusoFF
14 years, 2 months ago
dryabov wrote:
OK, let's combine them together:
			if(isset($GLOBALS['_JRESPONSE']) && isset($GLOBALS['_JRESPONSE']->headers['Content-type']))
unset($GLOBALS['_JRESPONSE']->headers['Content-type']);
 

(tested on real PHP5.3.4 server)

it is work similarly =)

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.