Project Wide Search and Replace MAJOR BUG!!!!

This is a serious WTF MFFFFFFWWFJKODSFJLD:SFJL: moment I'm having.

I have a GIANT project that I'm trying to convert to use my mysql driver class.

I need to change all occurances of 'mysql_query' to '$dbi->RawQuery'

I do CTRL+SHIFT+R

In the top box i enter: mysql_query
in the bottom box I enter: $dbi->RawQuery


Regex is NOT checked. None of the boxes are checked.


I run the repalcement for all files (970 occurances)

Most of the files are fine.

Then randomly some files are completely broken by the replacement

I end up with lines like this:

Starting:
list($matrix) = mysqli_fetch_row(mysql_query("select matrix from matricies where id='{$itemdata["color"]}'"));


Finished:
list($matrix) = my$dbi->RawQueryrow(mysql_query("select matrix from matricies where id='{$itemdata["color"]}'"));


Expected:
list($matrix) = mysqli_fetch_row($dbi->RawQuery("select matrix from matricies where id='{$itemdata["color"]}'"));


This is driving me absolutely F*ING NUTS! I've been banging my head for HOURS on this. HOURS!

Going through and replacing one at a time is not something I want to do.

WHAT. THE. HELL!!?

PHPStorm 7.1.3 Windows 8.1u1 x64

4 comments
Comment actions Permalink

Its like it just messes up after a while and in this instance replaced sql_fetch_row instead of mysql_query...

So freakin weird!

0
Comment actions Permalink

OK so I just tried it again from my desk top and it worked fine. My laptop only has a core i5 with like 4gb of ram so maybe there is some bug related to the lag being created by the processing overhead.

Desktop is a core i7 2600K Sandy Briged OCed at 4GHZ with 8GB of ram.

0
Comment actions Permalink

After reading the bug reports it might also be cause by the use of undo/redo during replace in path / project operations.

0

Please sign in to leave a comment.