From: Domas Mituzas Date: Wed, 1 Sep 2004 12:48:09 +0000 (+0000) Subject: strip profile name in case it exceeds db storage size (at 255 mark) X-Git-Tag: 1.5.0alpha1~2183 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=183ea63092cb864837102f39aa19ebb154253cad;p=lhc%2Fweb%2Fwiklou.git strip profile name in case it exceeds db storage size (at 255 mark) --- diff --git a/includes/Profiling.php b/includes/Profiling.php index 9b3277a9e8..5c5f3de158 100755 --- a/includes/Profiling.php +++ b/includes/Profiling.php @@ -170,7 +170,7 @@ class Profiler $dbw =& wfGetDB( DB_MASTER ); $profiling = $dbw->tableName( 'profiling' ); - $name = $dbw->strencode( $name ); + $name = substr($dbw->strencode( $name ),0,255); $sql = "UPDATE $profiling ". "SET pf_count=pf_count+{$eventCount}, ". "pf_time=pf_time + {$timeSum} ".