OSDN Git Service

FIX: デバッグ動作時に発生する警告に対処
[nucleus-jp/nucleus-jp-ancient.git] / nucleus / plugins / NP_SecurityEnforcer.php
index db1c1b7..c6a4361 100644 (file)
@@ -37,9 +37,9 @@ class NP_SecurityEnforcer extends NucleusPlugin {
                $query = "CREATE TABLE IF NOT EXISTS ". sql_table('plug_securityenforcer').
                                        " ( 
                                        `login` varchar(255),
-                                       `fails` int(11) NOT NULL default '0',                                     
+                                       `fails` int(11) NOT NULL default '0',
                                        `lastfail` bigint NOT NULL default '0',
-                                       KEY `login` (`login`)) TYPE=MyISAM";
+                                       KEY `login` (`login`)) ENGINE=MyISAM";
                sql_query($query);
                return;
        }
@@ -174,7 +174,7 @@ class NP_SecurityEnforcer extends NucleusPlugin {
        }
        
        public function event_PrePluginOptionsEdit($data) {
-               if ($data['plugid'] === $this->getID()) {
+               if (array_key_exists('plugid', $data) && $data['plugid'] === $this->getID()) {
                        foreach($data['options'] as $key => $value){
                                if (defined($value['description'])) {
                                        $data['options'][$key]['description'] = constant($value['description']);