Index: trunk/bin/module_maker/form_template.cli.php
===================================================================
--- trunk/bin/module_maker/form_template.cli.php	(revision 717)
+++ trunk/bin/module_maker/form_template.cli.php	(revision 718)
@@ -209,5 +209,4 @@
         case 'dec' :
         case 'numeric' :
-        default :
             $output[$field] = <<<E_O_F
 
@@ -225,5 +224,4 @@
         case 'time' :
         case 'year' :
-        default :
             $output[$field] = <<<E_O_F
 
Index: trunk/bin/module_maker/skel/admin.php
===================================================================
--- trunk/bin/module_maker/skel/admin.php	(revision 717)
+++ trunk/bin/module_maker/skel/admin.php	(revision 718)
@@ -56,5 +56,5 @@
 
 // Configure the cache object.
-$cache = new Cache('%NAME_PLURAL%');
+$cache =& Cache::getInstance('%NAME_PLURAL%');
 $cache->setParam(array('enabled' => true, 'expires' => 60));
 
@@ -64,5 +64,5 @@
 $page = new PageNumbers();
 $page->setPerPage(getFormData('per_page'), 100);
-$page->setPageNumber(getFormData('page_number'));
+$page->setPageNumber(getFormData('page_number', (getFormData('sort') ? 1 : null)));
 
 // Query parameters to retain always.
@@ -94,19 +94,19 @@
 switch (getFormData('op')) {
 
-case 'add' :
+case 'add':
     // Initialize variables for the form template.
-    $frm =& addRecordForm();
+    $frm = addRecordForm();
     $nav->add(_("Add %ITEM_TITLE%"));
     $main_template = '%ADMIN_FORM_TEMPLATE%';
     break;
 
-case 'edit' :
+case 'edit':
     // Initialize variables for the form template.
-    $frm =& editRecordForm(getFormData('%PRIMARY_KEY%'));
+    $frm = editRecordForm(getFormData('%PRIMARY_KEY%'));
     $nav->add(_("Edit %ITEM_TITLE%"));
     $main_template = '%ADMIN_FORM_TEMPLATE%';
     break;
 
-case 'del' :
+case 'del':
     deleteRecord(getFormData('%PRIMARY_KEY%'));%ADMIN_UPLOAD_DEL%
     if ($app->validBoomerangURL('%NAME_PLURAL%')) {
@@ -118,5 +118,5 @@
     break;
 
-case 'insert' :
+case 'insert':
     if (getFormdata('cancel', false)) {
         if ($app->validBoomerangURL('%NAME_PLURAL%')) {
@@ -129,5 +129,5 @@
     validateInput();
     if ($fv->anyErrors()) {
-        $frm =& addRecordForm();
+        $frm = addRecordForm();
         $frm = array_merge($frm, getFormData());
         $nav->add(_("Add %ITEM_TITLE%"));
@@ -147,5 +147,5 @@
     break;
 
-case 'update' :
+case 'update':
     if (getFormdata('reset', false)) {
         $app->raiseMsg(_("Saved values have been reloaded."), MSG_NOTICE, __FILE__, __LINE__);
@@ -165,5 +165,5 @@
     validateInput();
     if ($fv->anyErrors()) {
-        $frm =& editRecordForm(getFormData('%PRIMARY_KEY%'));
+        $frm = editRecordForm(getFormData('%PRIMARY_KEY%'));
         $frm = array_merge($frm, getFormData());
         $nav->add(_("Edit %ITEM_TITLE%"));
@@ -216,5 +216,5 @@
 %FORM_VALIDATION%
 
-function &addRecordForm()
+function addRecordForm()
 {
     // Set default values for the reset of the fields.
@@ -232,5 +232,5 @@
 }
 
-function &editRecordForm($id)
+function editRecordForm($id)
 {
     global $lock, $locally_carried_queries;
Index: trunk/lib/Lock.inc.php
===================================================================
--- trunk/lib/Lock.inc.php	(revision 717)
+++ trunk/lib/Lock.inc.php	(revision 718)
@@ -217,5 +217,4 @@
             return true;
         } else {
-            $app->logMsg(sprintf('No locked record: %s %s %s', $record_table_or_lock_id, $record_key, $record_val), LOG_DEBUG, __FILE__, __LINE__);
             return false;
         }
Index: trunk/lib/PDO.inc.php
===================================================================
--- trunk/lib/PDO.inc.php	(revision 717)
+++ trunk/lib/PDO.inc.php	(revision 718)
@@ -401,5 +401,5 @@
             $stmt = $this->dbh->query($query);
             if (!$stmt) {
-                throw new Exception('PDO::query returned false');
+                throw new \Exception('PDO::query returned false');
             }
         } catch (\Exception $e) {
@@ -454,5 +454,5 @@
             $stmt = $this->dbh->prepare($query, ...$params);
             if (!$stmt) {
-                throw new Exception('PDO::query returned false');
+                throw new \Exception('PDO::prepare returned false');
             }
         } catch (\PDOException $e) {
@@ -499,15 +499,15 @@
 
     /*
-    *
-    *
-    * @access   public
-    * @param
-    * @return
+    * Remove unsafe characters from SQL identifiers (tables, views, indexes, columns, and constraints).
+    *
+    * @access   public
+    * @param    string  $idname     Identifier name.
+    * @return   string              Clean string.
     * @author   Quinn Comendant <quinn@strangecode.com>
     * @since    09 Jul 2019 18:32:55
     */
-    static function sanitizeIdentifier($str)
-    {
-        return preg_replace('/\W/u', '', $str);
+    static function sanitizeIdentifier($idname)
+    {
+        return preg_replace('/\W/u', '', $idname);
     }
 
Index: trunk/lib/Utilities.inc.php
===================================================================
--- trunk/lib/Utilities.inc.php	(revision 717)
+++ trunk/lib/Utilities.inc.php	(revision 718)
@@ -677,16 +677,16 @@
     $val = trim(ini_get($val));
     if ($val != '') {
-        $last = strtolower($val{strlen($val) - 1});
-    } else {
-        $last = '';
-    }
-    switch ($last) {
-        // The 'G' modifier is available since PHP 5.1.0
-        case 'g':
-            $val *= 1024;
-        case 'm':
-            $val *= 1024;
-        case 'k':
-            $val *= 1024;
+        $unit = strtolower($val{strlen($val) - 1});
+        $val = preg_replace('/\D/', '', $val);
+
+        switch ($unit) {
+            // No `break`, so these multiplications are cumulative.
+            case 'g':
+                $val *= 1024;
+            case 'm':
+                $val *= 1024;
+            case 'k':
+                $val *= 1024;
+        }
     }
 
@@ -1063,8 +1063,16 @@
     $app =& App::getInstance();
 
-    if ('POST' == getenv('REQUEST_METHOD') && null === $key) {
-        return dispelMagicQuotes($_POST, $app->getParam('always_dispel_magicquotes'));
-    } else if ('GET' == getenv('REQUEST_METHOD') && null === $key) {
-        return dispelMagicQuotes($_GET, $app->getParam('always_dispel_magicquotes'));
+    if (null === $key) {
+        // Return entire array.
+        switch (strtoupper(getenv('REQUEST_METHOD'))) {
+        case 'POST':
+            return dispelMagicQuotes($_POST, $app->getParam('always_dispel_magicquotes'));
+
+        case 'GET':
+            return dispelMagicQuotes($_GET, $app->getParam('always_dispel_magicquotes'));
+
+        default:
+            return dispelMagicQuotes($_REQUEST, $app->getParam('always_dispel_magicquotes'));
+        }
     }
 
@@ -1139,4 +1147,6 @@
         break;
     }
+
+    $_REQUEST[$key] = $val;
 }
 
