Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor optimization on Inflector::variable

  • Loading branch information...
commit c8297ff283e03f7cd0cf1e25b75857271488b107 1 parent aa3a197
Mark Story markstory authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  cake/libs/inflector.php
2  cake/libs/inflector.php
View
@@ -481,7 +481,7 @@ function classify($tableName) {
function variable($string) {
$string = Inflector::camelize(Inflector::underscore($string));
$replace = strtolower(substr($string, 0, 1));
- return preg_replace('/\\w/', $replace, $string, 1);
+ return $replace . substr($string, 1);
}
/**
* Returns a string with all spaces converted to underscores (by default), accented
Please sign in to comment.
Something went wrong with that request. Please try again.