Skip to content

Commit

Permalink
Remove negative lookup that breaks keys with digits
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrej Mihajlov committed Dec 19, 2014
1 parent 9a7179d commit ad6351a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion query_create.class.php
Expand Up @@ -287,7 +287,7 @@ private function rewrite_set(){
* @access private
*/
private function rewrite_key(){
$this->_query = preg_replace_callback('/,\\s*(KEY|INDEX)\\s*(\\w+)?\\s*(\(.*(?<!\\d)\))/im', array($this, '_rewrite_key'), $this->_query);
$this->_query = preg_replace_callback('/,\\s*(KEY|INDEX)\\s*(\\w+)?\\s*(\(.*?\))/im', array($this, '_rewrite_key'), $this->_query);
}
/**
* Callback method for rewrite_key.
Expand Down

0 comments on commit ad6351a

Please sign in to comment.