Page 1 of 1

PHP error.. how can I fix this?

Posted: Thu Oct 23, 2008 3:52 pm
by zanderzz
Here are the errors.. anyone have any ideas?


Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

Notice: Only variables should be assigned by reference in /home/account/public_html/site.com/phrame/ActionController.php on line 122

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/HttpServletRequest.php on line 128

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95

Notice: Only variable references should be returned by reference in /home/account/public_html/site.com/phrame/util/HashMap.php on line 95


_________________________________


line 95 is this. }

Code: Select all

 
 
 
#
 */
#
        function &get($key, $default=PHRAME_HASHMAP_DEFAULT)
#
        {
#
                if ($this->containsKey($key)) {
#
                        return $this->_values[$key];
#
                } else {
#
                        if (PHRAME_HASHMAP_DEFAULT != $default) {
#
                                return $default;
#
                        }
#
                }
#
        }
#
        /**
#
         * Returns true if this map contains no key-value mappings.
#
         *
#
         * @access      public
#
         * @return      boolean
#
         */
#
        function isEmpty()
#
        {
 
 
 
 
 

-----------------------

Line 122 is this

$actionMapping =& $this->_mappings->findMapping($name);

Code: Select all

 
 
 
#
 * @access      private
#
         * @param       array                   $mappings
#
         * @param       array                   $request
#
         * @return      ActionMapping
#
         */
#
        function &_processMapping()
#
        {
#
                $name = $this->_request->getAction();
#
                $actionMapping =&  $this->_mappings->findMapping($name);
#
                if (!isset($actionMapping)) {
#
                        trigger_error("No mappings found for action '$name'");
#
                        return;
#
                }
#
                return $actionMapping;
 
 
 ;
 
 
 
 

Re: PHP error.. how can I fix this?

Posted: Fri Oct 24, 2008 2:22 pm
by jaoudestudios
Notices are not very important, only a perfectionist or a C/AS3 programmer worries about it - php is sooooo forgiving!

Change your php.ini to display errors but not notices... E_ALL ^ E_NOTICES

Then they will magically disappear. However, I recommend leaving them on, but if you are using someone elses code then it could be difficult to remove all notices properly.