--- pagelist.php	2017-11-14 04:01:53.000000000 -0600
+++ pagelist-cg.php	2017-11-14 23:48:17.199006843 -0600
@@ -504,13 +504,13 @@
     { NoCache(); foreach($list as $pn) $PCache[$pn]['random'] = rand(); }
   foreach(preg_grep('/^\\$/', array_keys($order)) as $o) 
     foreach($list as $pn) 
       $PCache[$pn][$o] = PageVar($pn, $o);
   foreach($PageListSortCmp as $o=>$f)
     if(! is_callable($f)) # DEPRECATED
-      $PageListSortCmp[$o] = create_function('$x,$y', "return {$f};");
+      $PageListSortCmp[$o] = create_function('$x,$y', "global \$PCache; return {$f};");
 
   StopWatch('PageListSort sort');
   if (count($opt['=order'])) {
     $PCache['=pagelistoptorder'] = $opt['=order'];
     uasort($list, 'PageListUASort');
   }
