Admin cant update and save member profiles

As admin I cant update,modify and save member profiles. I hit save and nothing happens. These are the errors i'm getting.

[25-Jun-2011 16:32:13] PHP Parse error:  syntax error, unexpected ')' in /home/snowmobi/public_html/inc/classes/BxDolProfileFields.php(372) : runtime-created function on line 1
[25-Jun-2011 16:32:13] PHP Fatal error:  Function name must be a string in /home/snowmobi/public_html/inc/classes/BxDolProfileFields.php on line 374

 

I've looked for the unexpected ')' in /home/snowmobi/public_html/inc/classes/BxDolProfileFields.php @ line 372 but found no problem. I also renamed it and uploaded a fresh copy but it still gives the same error.

What's going on?

Give me something to believe in...
Quote · 25 Jun 2011

This may be unrelated but I'm also getting this error too.

[25-Jun-2011 18:38:52] PHP Warning:  mysql_error(): 30 is not a valid MySQL-Link resource in /home/snowmobi/public_html/inc/classes/BxDolDb.php on line 240
[25-Jun-2011 18:38:52] PHP Warning:  mysql_ping(): 30 is not a valid MySQL-Link resource in /home/snowmobi/public_html/inc/classes/BxDolDb.php on line 244
[25-Jun-2011 18:38:52] PHP Warning:  mysql_close(): 30 is not a valid MySQL-Link resource in /home/snowmobi/public_html/inc/classes/BxDolDb.php on line 245

Give me something to believe in...
Quote · 25 Jun 2011

From what I understand there looks to be an ) in that line that isn't supposed to be there. Does every ( have a ) to close it?

Angela
Quote · 25 Jun 2011

 

From what I understand there looks to be an ) in that line that isn't supposed to be there. Does every ( have a ) to close it? Look on line 1.

 

Angela
Quote · 25 Jun 2011

 

From what I understand there looks to be an ) in that line that isn't supposed to be there. Does every ( have a ) to close it?

 Yes looks ok, I checked it with a new copy

 

 

 function checkPostValueForCheck( $aItem, $mValue ) {
        $sCheck = $aItem['Check'];
        if( empty($sCheck) )
            return true;
       
        $sFunc = create_function( '$arg0', $sCheck );       This is line 372
       
        if( !$sFunc( $mValue ) )
            return false;
       
        return true;
    }

Give me something to believe in...
Quote · 25 Jun 2011

 

 

From what I understand there looks to be an ) in that line that isn't supposed to be there. Does every ( have a ) to close it?

 Yes looks ok, I checked it with a new copy

 

 

 function checkPostValueForCheck( $aItem, $mValue ) {
        $sCheck = $aItem['Check'];
        if( empty($sCheck) )
            return true;
       
        $sFunc = create_function( '$arg0', $sCheck );       This is line 372
       
        if( !$sFunc( $mValue ) )
            return false;
       
        return true;
    }


This is simply a lack of understanding what the function create_function does.

There is nothing wrong with the code on that line. But there could be a problem with the code being passed to the function. Thus your looking for the error in the wrong place.

The clue is in your first post which i marked in red

[25-Jun-2011 16:32:13] PHP Parse error:  syntax error, unexpected ')' in /home/snowmobi/public_html/inc/classes/BxDolProfileFields.php(372) : runtime-created function on line 1

More information on the create_function function.

The second parameter of this function takes code and creates a function from it.

In dolphin, the profile fields have a check value. This field contains code that is used to do additional checking to make sure the information entered in that profile field is ok.

Dolphin uses this create_function to process that code.

So i suspect the check value in one of the profile fields is the cause of your error.

As for which one, i can't tell you that. If you have another dolphin install you can compare these values to, you should be able to find out. Or if you remember playing with any of them, then that should help you narrow it down.




https://www.deanbassett.com
Quote · 26 Jun 2011

Thanks Dean, that was a big help! The problem was the check value for NickName was incorrect.

I had this

preg_match( '/^[a-zA-Z0-9_-]+$/', $arg0 ) and !file_exists( $dir['root'] . $arg0 ) );

 

It should look like this

return ( preg_match( '/^[a-zA-Z0-9_-]+$/', $arg0 ) and !file_exists( $dir['root'] . $arg0 ) );

Give me something to believe in...
Quote · 26 Jun 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.