OSDN Git Service

Avoid notice for empty valiable
authorkmorimatsu <kmorimatsu@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 3 Dec 2007 02:22:42 +0000 (02:22 +0000)
committerkmorimatsu <kmorimatsu@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Mon, 3 Dec 2007 02:22:42 +0000 (02:22 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/branches/branch-3-3@356 1ca29b6e-896d-4ea0-84a5-967f57386b96

utf8/nucleus/libs/PLUGIN.php

index 0f9e5fa..af73237 100755 (executable)
@@ -17,8 +17,8 @@
         *
         * @license http://nucleuscms.org/license.txt GNU General Public License
         * @copyright Copyright (C) 2002-2007 The Nucleus Group
-        * @version $Id: PLUGIN.php,v 1.12.2.2 2007-12-03 01:15:07 kmorimatsu Exp $
-        * $NucleusJP: PLUGIN.php,v 1.12.2.1 2007/09/05 07:40:59 kimitake Exp $
+        * @version $Id: PLUGIN.php,v 1.12.2.3 2007-12-03 02:22:42 kmorimatsu Exp $
+        * $NucleusJP: PLUGIN.php,v 1.12.2.2 2007/12/03 01:15:07 kmorimatsu Exp $
         */
        class NucleusPlugin {
 
                        }
                        mysql_free_result($res);
 
-                       return $this->_aOptionToInfo[$key]['oid'];
+                       return @$this->_aOptionToInfo[$key]['oid'];
                }
                function _getDefVal($context, $name) {
                        $key = $context . '_' . $name;
                                                $meta = NucleusPlugin::getOptionMeta($o->oextra);
 
                                                // if the option is readonly or hidden it may not be saved
-                                               if (($meta['access'] != 'readonly') && ($meta['access'] != 'hidden')) {
+                                               if ((@$meta['access'] != 'readonly') && (@$meta['access'] != 'hidden')) {
 
                                                        $value = undoMagic($value);     // value comes from request
 
                                                        }
 
                                                        // check the validity of numerical options
-                                                       if (($meta['datatype'] == 'numerical') && (!is_numeric($value))) {
+                                                       if ((@$meta['datatype'] == 'numerical') && (!is_numeric($value))) {
                                                                //the option must be numeric, but the it isn't
                                                                //use the default for this option
                                                                $value = $o->odef;