This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 182010

Summary: accepting code completion in var rename produces double $
Product: editor Reporter: nbphpuser <nbphpuser>
Component: CSL (API & infrastructure)Assignee: Jan Lahoda <jlahoda>
Status: RESOLVED FIXED    
Severity: normal CC: rmatous
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description nbphpuser 2010-03-15 09:00:24 UTC
<?php
//try to rename $_GET to $_POST via CTRL+R shortcut and code completion for $_POST

//1. put cursor on $_GET
//2. CTRL+R
//3. Type _p
//4. code completion pops up
//5. accept suggestion $_POST
//6. final result: all other $_GET variables became $$_POST instead of $_POST

//initial code
if($_GET && isset($_GET['id'])){
    print 'get';
}


//final result
if($_POST && isset($$_POST['id'])){
    print 'get';
}

?>
Comment 1 Jan Lahoda 2010-03-17 17:08:02 UTC
Lets try this:
http://hg.netbeans.org/jet-main/rev/2125d16a823d