Welcome, Guest
Username Password: Remember me

php 5.3 problem
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: php 5.3 problem

php 5.3 problem 13 years, 11 months ago #691

  • UksusoFF
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
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?

php 5.3 problem 13 years, 11 months ago #2770

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
Try to replace
			unset($GLOBALS['_JRESPONSE']->headers['Content-type']);

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

php 5.3 problem 13 years, 11 months ago #2771

  • UksusoFF
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
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

php 5.3 problem 13 years, 11 months ago #2774

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
Sorry, replace by
            if(isset($GLOBALS['_JRESPONSE']->headers['Content-type'])) 
unset($GLOBALS['_JRESPONSE']->headers['Content-type']);

php 5.3 problem 13 years, 11 months ago #2776

  • UksusoFF
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
sorry, both variants worked, i'm stupid =)
thanks

php 5.3 problem 13 years, 11 months ago #2777

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
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)

php 5.3 problem 13 years, 11 months ago #2778

  • UksusoFF
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
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 =)
  • Page:
  • 1
Time to create page: 0.35 seconds

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.