OSDN Git Service

add check -- is argument numeric?
authorpanda <panda>
Tue, 18 Feb 2003 11:59:09 +0000 (20:59 +0900)
committerpanda <panda>
Tue, 18 Feb 2003 11:59:09 +0000 (20:59 +0900)
plugin/recent.inc.php

index f7ab4db..d770cd7 100644 (file)
@@ -12,7 +12,7 @@
  *  2002.06.17: plugin_recent_init()¤òÀßÄê
  *  2002.07.02: <ul>¤Ë¤è¤ë½ÐÎϤËÊѹ¹¤·¹½Â¤²½
  *
- * $id$
+ * $Id: recent.inc.php,v 1.9 2003/02/18 11:59:09 panda Exp $
  */
 
 function plugin_recent_convert()
@@ -21,8 +21,12 @@ function plugin_recent_convert()
        global $_recent_plugin_frame;
        
        $recent_lines = 10;
-       if (func_num_args())
-               list($recent_lines) = func_get_args();
+       if (func_num_args()) {
+               $args = func_get_args();
+               if (is_numeric($args)) {
+                       $recent_lines = $args[0];
+               }
+       }
        
        $date = $items = '';
        if (!file_exists(CACHE_DIR.'recent.dat')) {