Jump to content

Mambo Help? Notice: Undefined variable


garygas

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.