Jump to content

Help with array...


pro_se

Recommended Posts

Hello all, I have not posted here in a while...

I keep getting this error: Parse error: syntax error, unexpected ',' in /home/*hidden*/*from*/*you*/includes/functions_base.inc.php on line 843

with this code...

[code] <?php
function int2folderperm ($int)
{
  $int & FOLDER_FRIEND_ACCESS;
  $int & FOLDER_FAMILY_ACCESS;
return array ('friend' => (int), 'family' => (int));  //line 843
  } ?>
[/code]

any suggestions?
Link to comment
Share on other sites

I'm not really sure what you're trying to accomplish here.  But the reason you're getting the unexpected ',' error is because you are using the cast operator "(int)" with no parameter.  Maybe you meant to do this?

[code]
<?php
function int2folderperm ($int)
{
  $foo = $int & FOLDER_FRIEND_ACCESS;
  $bar = $int & FOLDER_FAMILY_ACCESS;
return array ('friend' => (int)$foo, 'family' => (int)$bar);  //line 843
  } ?>
[/code]

Best,

Patrick
Link to comment
Share on other sites

thanks, that got rid of the error but now its not showing what file is public and what file is private... i am using uploader v6.3 and that segment/ function of code is used to convert the integer into a string for example it would convert 1 to public.. how would that work with this particular function..??
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.