Changeset 718 for trunk/lib/PDO.inc.php
- Timestamp:
- Feb 17, 2020 11:01:55 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/PDO.inc.php
r698 r718 401 401 $stmt = $this->dbh->query($query); 402 402 if (!$stmt) { 403 throw new Exception('PDO::query returned false');403 throw new \Exception('PDO::query returned false'); 404 404 } 405 405 } catch (\Exception $e) { … … 454 454 $stmt = $this->dbh->prepare($query, ...$params); 455 455 if (!$stmt) { 456 throw new Exception('PDO::queryreturned false');456 throw new \Exception('PDO::prepare returned false'); 457 457 } 458 458 } catch (\PDOException $e) { … … 499 499 500 500 /* 501 * 502 * 503 * @access public 504 * @param 505 * @return 501 * Remove unsafe characters from SQL identifiers (tables, views, indexes, columns, and constraints). 502 * 503 * @access public 504 * @param string $idname Identifier name. 505 * @return string Clean string. 506 506 * @author Quinn Comendant <quinn@strangecode.com> 507 507 * @since 09 Jul 2019 18:32:55 508 508 */ 509 static function sanitizeIdentifier($ str)510 { 511 return preg_replace('/\W/u', '', $ str);509 static function sanitizeIdentifier($idname) 510 { 511 return preg_replace('/\W/u', '', $idname); 512 512 } 513 513
Note: See TracChangeset
for help on using the changeset viewer.