Undefined variable in mod_news_pro_gk4
Professional Business Joomla template for corporate and business websites suitable for showing stock quotes, up to date news, portfolio management resources or international market data.
- GK User
- Wed Jan 02, 2013 3:31 pm
Hi!
I have enable Error reporting in my joomla settings and select level on Maximum.
Then i look have a trouble with undefined variable - itemid, news_text.
When i looking in the code in rows 1265 or 1269 - i can`t finding transfer this parameters in function image_vm!
Why you do not send and no checks the parameters? or give set to default values for them?
Version: GK4 3.1. 05/04/2012
I have enable Error reporting in my joomla settings and select level on Maximum.
Then i look have a trouble with undefined variable - itemid, news_text.
- Code: Select all
Notice: Undefined variable: itemid in /var/www/.../modules/mod_news_pro_gk4/tmpl/layout.parts.php on line 1265
Notice: Undefined variable: news_text in /var/www/.../modules/mod_news_pro_gk4/tmpl/layout.parts.php on line 1269
When i looking in the code in rows 1265 or 1269 - i can`t finding transfer this parameters in function image_vm!
- Code: Select all
function image_vm($config, $news_id, $news_cid, $news_image, $news_title){
$news_title = str_replace('"', """, $news_title);
$IMG_SOURCE = JURI::root() . $news_image;
$IMG_LINK = 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id='.$news_id.'&virtuemart_category_id='.$news_cid.'&Itemid='.$itemid;
if(preg_match('/\<img.*src=.*?\>/',$news_text)){
$imgStartPos = JString::strpos($news_text, 'src="');
if($imgStartPos) $imgEndPos = JString::strpos($news_text, '"', $imgStartPos + 5);
if($imgStartPos > 0) $IMG_SOURCE = JString::substr($news_text, ($imgStartPos + 5), ($imgEndPos - ($imgStartPos + 5)));
}
...........
Why you do not send and no checks the parameters? or give set to default values for them?
Version: GK4 3.1. 05/04/2012
-
- Fresh Boarder
- GK User
- Wed Jan 02, 2013 10:31 pm
Please firstly update News Show Pro extension to latest available version then let me know whether the Notice message is still visible. Did you notice any problems cause by this not declared variable ?
-
- Platinum Boarder
- GK User
- Fri Oct 10, 2014 10:35 pm
HI, i have exactely the same problem?
-
- Fresh Boarder
3 posts
• Page 1 of 1