Jump to content

Parse error: syntax erro unexpected T_FUNCTION


Dakotamay

Recommended Posts

Hello

I'm new here. I thank everyone in advance for their help. I'm also new to coding. I've run into this error. Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /rb.php on line 7806

I've tried a few fixes that I've read and nothing works. I will let everyone know. I am with Ipage hosting. I have heard that it is hard to get scripts to run on their servers. They have php version 5.2.12. I was reading that this particular coding is used in 5.3 and above. I'm completely lost here.

If someone could show me how to write this properly. I'd be much appreciative.

Here is the code from the file. I have highlighted in red the offending code. I have also included a few other lines to be as helpful as possible.

Again thanks in advance for the help. I was also able to include an image.

 

* @return array $results

*/

public static function exec( $sql, $values=array() ) {

return self::secureExec(function($sql, $values')' {

return R::$adapter->exec( $sql, $values );

}, NULL, $sql, $values);

}

/**

* Convenience function to execute Queries directly.

* Executes SQL.

*

* @param string $sql sql

* @param array  $values values

*

* @return array $results

*/

public static function getAll( $sql, $values=array() ) {

return self::secureExec(function($sql, $values) {

return R::$adapter->get( $sql, $values );

}, array(), $sql, $values);

}

/**

* Convenience function to execute Queries directly.

* Executes SQL.

*

* @param string $sql sql

* @param array  $values values

*

 

 

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

Your image and your pasted code doesn't match.  Which is true, which isn't.  The pasted code will fail to parse.

 

public static function exec( $sql, $values=array() ) {
      return self::secureExec(function($sql, $values')' { <-HERE, remove the quotes from around the closing argument parenthesis.
         return R::$adapter->exec( $sql, $values );
      }, NULL, $sql, $values);
   }

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.