Changeset 419
- Timestamp:
- Jul 3, 2013 3:36:59 PM (11 years ago)
- Location:
- trunk/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/DB.inc.php
r418 r419 302 302 } 303 303 304 // Ensure we have an active connection. 304 // Ensure we have an active connection. 305 // If we continue on a dead connection we might experience a "MySQL server has gone away" error. 306 // http://dev.mysql.com/doc/refman/5.0/en/gone-away.html 305 307 if (!mysql_ping($this->dbh)) { 306 $app->logMsg( 'MySQL ping failed; reconnectingâŠ', LOG_NOTICE, __FILE__, __LINE__);308 $app->logMsg(sprintf('MySQL ping failed; reconnecting⊠("%s")', truncate(trim($debugqry), 150)), LOG_NOTICE, __FILE__, __LINE__); 307 309 $this->reconnect(); 308 310 } -
trunk/lib/Utilities.inc.php
r414 r419 276 276 * @since 29 Mar 2006 13:48:49 277 277 */ 278 function truncate($str, $len, $where=' middle', $delim='…')278 function truncate($str, $len, $where='end', $delim='âŠ') 279 279 { 280 280 if ($len <= 3 || mb_strlen($str) <= 3) {
Note: See TracChangeset
for help on using the changeset viewer.