PMCORE-2973 Review the WARNING in the file workflow/engine/methods/reportTables/reportTables_Ajax.php

This commit is contained in:
Roly Rudy Gutierrez Pinto
2021-04-20 00:03:44 -04:00
parent a0d60b9068
commit a64d4fb0bd

View File

@@ -346,7 +346,9 @@ function to_camel_case ($str, $capitalise_first_char = true)
if ($capitalise_first_char) {
$str[0] = strtoupper( $str[0] );
}
$func = create_function( '$c', 'return strtoupper($c[1]);' );
$func = function ($c) {
return strtoupper($c[1]);
};
return preg_replace_callback( '/_([a-z])/', $func, $str );
}