VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: sandum150 on August 14, 2013, 08:24:03 AM

Title: warning on views\category\view.html.php
Post by: sandum150 on August 14, 2013, 08:24:03 AM
I've gor this message on the top of product category page:

Warning: Creating default object from empty value in C:\xampp\htdocs\volta25\components\com_virtuemart\views\category\view.html.php on line 187

joomla 2.5.11
virtuemart 2.0.22a
php 5.5.1
Title: Re: warning on views\category\view.html.php
Post by: Lexiboy on August 14, 2013, 09:07:39 AM
Did you modify the template?
If so, than please paste line 187, or better, the block of code that it is part of.
Title: Re: warning on views\category\view.html.php
Post by: sandum150 on August 14, 2013, 09:26:40 AM
Just made override of tmpl/default.php. The view.html.php wasn't modified.

the code is:
            if(JVM_VERSION === 2 ) {
               $results = $dispatcher->trigger('onContentPrepare', array('com_virtuemart.category', &$category, &$params, 0));
               // More events for 3rd party content plugins
               // This do not disturb actual plugins, because we don't modify $product->text
               $res = $dispatcher->trigger('onContentAfterTitle', array('com_virtuemart.category', &$category, &$params, 0));
               $category->event->afterDisplayTitle = trim(implode("\n", $res));

               $res = $dispatcher->trigger('onContentBeforeDisplay', array('com_virtuemart.category', &$category, &$params, 0));
               $category->event->beforeDisplayContent = trim(implode("\n", $res));

               $res = $dispatcher->trigger('onContentAfterDisplay', array('com_virtuemart.category', &$category, &$params, 0));
               $category->event->afterDisplayContent = trim(implode("\n", $res));
            }

and the 187th line is:
               $category->event->afterDisplayTitle = trim(implode("\n", $res));
Title: Re: warning on views\category\view.html.php
Post by: sandum150 on August 15, 2013, 10:45:32 AM
Now I put the original file default.php, after that tried to disable de override. The problem is the same.
nobody knows what is the problem??
Title: Re: warning on views\category\view.html.php
Post by: Maxim Pishnyak on August 15, 2013, 11:11:37 AM
You could turn off displaying unimportant warnings in your Joomla configuration.
Title: Re: warning on views\category\view.html.php
Post by: jenkinhill on August 15, 2013, 11:13:22 AM
Possibly related to using PHP5.5 - version development is currently based on PHP5.3 (many users still are on servers with PHP5.2). You can turn off the warning. http://forum.virtuemart.net/index.php?topic=102555.0