Forum Index > FlashYourWeb OS Support > Gallery 2 Bridge New Topic Post Reply
 Upgrade Issues with GL 1.6.1
 |  Printable Version
Anonymous: maab
 February 27 2010 01:45 AM (Read 1658 times)  


I just upgraded G2Bridge, but when I try to renable the plugin on the plugin Admin page, the resulting page is blank. When I check my Apache log I see:

PHP Formatted Code
[27-Feb-2010 01:57:33] PHP Parse error:  parse error, unexpected '(', expecting '}' in /private_GL/plugins/G2Bridge/functions.inc on line 1523


Which is this line of G2Bridge/functions.inc

PHP Formatted Code
            $userName = DB_getItem($_TABLES['users'], 'uid', "username = '{$owner->getUserName()}'");


Thanks


 
Quote
suprsidr
 February 27 2010 04:56 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

That's a bit of php shorthand which strangely you'll find throughout geeklog - funny this one ticks.

try replacing the line with:

PHP Formatted Code

$userName = DB_getItem($_TABLES['users'], 'uid', "username = '".$owner->getUserName()."'");
 


-s


There will always be...
 
Profile Email Website
Quote
suprsidr
 February 27 2010 05:10 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Actually I just updated the archive (functions.inc only) with a couple of other tiny fixes I've accumulated.
Like declaring jQuery if your planning on using my cool new uploader for gallery Wink

-s


There will always be...
 
Profile Email Website
Quote
Anonymous: maab
 February 27 2010 10:37 AM  


that fixed that problem, it installed, but now has problems during the upgrade.

From the log file:

PHP Formatted Code
[27-Feb-2010 10:42:30] PHP Fatal error:  Call to undefined function:  array_diff_key() in /private_GL/plugins/G2Bridge/functions.inc on line 1655


which is:

PHP Formatted Code
    foreach (array_diff_key($_G2B_DEFAULT, $_G2B_CONF) as $key=>$params) {
 




I just updated the archive


What do you mean, do you have a even newer version?


 
Quote
suprsidr
 February 27 2010 10:49 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

So your running PHP 4.x?
you can add this to the top of functions.inc

PHP Formatted Code

if (!function_exists(array_diff_key)){
    function array_diff_key() {
        $arrs = func_get_args();
        $result = array_shift($arrs);
        foreach ($arrs as $array) {
            foreach ($result as $key => $v) {
                if (array_key_exists($key, $array)) {
                    unset($result[$key]);
                }
            }
        }
        return $result;
    }
}
 


There will always be...
 
Profile Email Website
Quote
Anonymous: maab
 February 27 2010 11:48 AM  


outstanding, that fixed it.
Thank you!

Yep, I am running php 4.x


 
Quote
Content generated in: 0.26 seconds
New Topic Post Reply



 All times are PDT. The time is now 11:21 AM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
HTML Allowed 
Censored Content