Changeset 718 for trunk/lib/PDO.inc.php


Ignore:
Timestamp:
Feb 17, 2020 11:01:55 PM (4 years ago)
Author:
anonymous
Message:

Minor fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/PDO.inc.php

    r698 r718  
    401401            $stmt = $this->dbh->query($query);
    402402            if (!$stmt) {
    403                 throw new Exception('PDO::query returned false');
     403                throw new \Exception('PDO::query returned false');
    404404            }
    405405        } catch (\Exception $e) {
     
    454454            $stmt = $this->dbh->prepare($query, ...$params);
    455455            if (!$stmt) {
    456                 throw new Exception('PDO::query returned false');
     456                throw new \Exception('PDO::prepare returned false');
    457457            }
    458458        } catch (\PDOException $e) {
     
    499499
    500500    /*
    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.
    506506    * @author   Quinn Comendant <quinn@strangecode.com>
    507507    * @since    09 Jul 2019 18:32:55
    508508    */
    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);
    512512    }
    513513
Note: See TracChangeset for help on using the changeset viewer.