PHP error.. how can I fix this?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zanderzz
Forum Newbie
Posts: 7
Joined: Thu Oct 23, 2008 3:48 pm

PHP error.. how can I fix this?

Post 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;
 
 
 ;
 
 
 
 
User avatar
jaoudestudios
DevNet Resident
Posts: 1483
Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey

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

Post 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.
Post Reply