garygas Posted August 27, 2008 Share Posted August 27, 2008 I am managing a Mambo system for a friend and currently am getting a number of 'Notice: Undefined variable'. This has only happened since their host upgraded to PHP version 5. Has anyone had a similar issue? Thanks for any help! Gazza Link to comment https://forums.phpfreaks.com/topic/121590-mambo-help-notice-undefined-variable/ Share on other sites More sharing options...
Ken2k7 Posted August 27, 2008 Share Posted August 27, 2008 Does the error tell you the file that produces that error and the line number? If so, can you post the code here? Link to comment https://forums.phpfreaks.com/topic/121590-mambo-help-notice-undefined-variable/#findComment-627124 Share on other sites More sharing options...
garygas Posted August 27, 2008 Author Share Posted August 27, 2008 Does the error tell you the file that produces that error and the line number? If so, can you post the code here? \htdocs\includes\mambo.php on line 1988 Link to comment https://forums.phpfreaks.com/topic/121590-mambo-help-notice-undefined-variable/#findComment-627126 Share on other sites More sharing options...
Ken2k7 Posted August 27, 2008 Share Posted August 27, 2008 Does the error tell you the file that produces that error and the line number? If so, can you post the code here? \htdocs\includes\mambo.php on line 1988 Could you post the code here? Link to comment https://forums.phpfreaks.com/topic/121590-mambo-help-notice-undefined-variable/#findComment-627130 Share on other sites More sharing options...
garygas Posted August 27, 2008 Author Share Posted August 27, 2008 Does the error tell you the file that produces that error and the line number? If so, can you post the code here? \htdocs\includes\mambo.php on line 1988 Could you post the code here? I was supposed to do that but lost myself for a second...I suppose thats what happens when you try to do a million things at once! 1970: /** 1971: * Utility function to return a value from a named array or a specified default 1972: */ 1973: define( "_MOS_NOTRIM", 0x0001 ); 1974: define( "_MOS_ALLOWHTML", 0x0002 ); 1975: define( "_MOS_ALLOWRAW", 0x0004 ); 1976: function mosGetParam( &$arr, $name, $def=null, $mask=0 ) { 1977: if (isset( $arr[$name] )) { 1978: if (is_array($arr[$name])) foreach ($arr[$name] as $key=>$element) mosGetParam ($arr[$name], $key, $def, $mask); 1979: else { 1980: if (!($mask&_MOS_NOTRIM)) $arr[$name] = trim( $arr[$name] ); 1981: if (!is_numeric( $arr[$name] )) { 1982: if (!($mask&_MOS_ALLOWHTML)) $arr[$name] = strip_tags( $arr[$name] ); 1983: if (!($mask&_MOS_ALLOWRAW)) { 1984: if (is_numeric($def)) $arr[$name] = intval($arr[$name]); 1985: } 1986: } 1987: if (!get_magic_quotes_gpc()) { 1988: $return = addslashes( $return ); 1989: } 1990: } 1991: return $arr[$name]; 1992: } else { 1993: return $def; 1994: } 1995: } Link to comment https://forums.phpfreaks.com/topic/121590-mambo-help-notice-undefined-variable/#findComment-627138 Share on other sites More sharing options...
revraz Posted August 27, 2008 Share Posted August 27, 2008 It was probably designed for Register Globals turned on. Link to comment https://forums.phpfreaks.com/topic/121590-mambo-help-notice-undefined-variable/#findComment-627141 Share on other sites More sharing options...
discomatt Posted August 27, 2008 Share Posted August 27, 2008 Take this to the Mambo devs/forums please. To disable these, just force PHP into more strict error reporting. This can be done with error_reporting() or an .htaccess file ( assuming apache ) Link to comment https://forums.phpfreaks.com/topic/121590-mambo-help-notice-undefined-variable/#findComment-627145 Share on other sites More sharing options...
wildteen88 Posted August 27, 2008 Share Posted August 27, 2008 I do not think the following is not needed 1987: if (!get_magic_quotes_gpc()) { 1988: $return = addslashes( $return ); 1989: } Seems out of place to me, definitely take it up with Mambos dev team. Link to comment https://forums.phpfreaks.com/topic/121590-mambo-help-notice-undefined-variable/#findComment-627149 Share on other sites More sharing options...
garygas Posted August 27, 2008 Author Share Posted August 27, 2008 I do not think the following is not needed 1987: if (!get_magic_quotes_gpc()) { 1988: $return = addslashes( $return ); 1989: } Seems out of place to me, definitely take it up with Mambos dev team. wildteen.....quality!! Just removed the lines and cleaned up the error. THANK YOU!! Link to comment https://forums.phpfreaks.com/topic/121590-mambo-help-notice-undefined-variable/#findComment-627160 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.