Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001216 [Quercus] minor always 06-26-06 11:24 06-26-06 19:00
Reporter nxnlvz View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.0.20 Product Version 3.0.19
  Product Build
Summary 0001216: reference to GLOBAL variable can not be set using variable variables
Description When creating refernce to global variable using _ Variable variables _ the parser for oject VarExpr will return false. This causes QuercusParser to fail with "unknown expr to global"

The following will work

  global $link;

This will not
  global $$link;

But you can assign it using

$$link =& $GLOBALS["link"];


Steps To Reproduce
Additional Information Here is the full function. It comes from OSCommerce

function osc_db_connect($server, $username, $password, $link = 'db_link') {
    //global $$link, $db_error;
    //global $db_error1;
    //global $$link;

    $$link =& $GLOBALS["link"];
    $db_error =& $GLOBALS["db_error"];

    $db_error = false;

    if (!$server) {
      $db_error = 'No Server selected.';
      return false;
    }

    $$link = @mysql_connect($server, $username, $password) or $db_error = mysql_error();

    return $$link;
  }

Attached Files

- Relationships

- Notes
(0001312)
ferg
06-26-06 19:00

php/0237, php/3237
 

- Issue History
Date Modified Username Field Change
06-26-06 11:24 nxnlvz New Issue
06-26-06 19:00 ferg Note Added: 0001312
06-26-06 19:00 ferg Assigned To  => ferg
06-26-06 19:00 ferg Status new => closed
06-26-06 19:00 ferg Resolution open => fixed
06-26-06 19:00 ferg Fixed in Version  => 3.0.20


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker