[OFBiz] SVN: r7062 - trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog
jacopo@svn.ofbiz.org
jacopo at svn.ofbiz.org
Fri Mar 24 00:25:33 CST 2006
Author: jacopo
Date: 2006-03-24 00:25:27 -0600 (Fri, 24 Mar 2006)
New Revision: 7062
Modified:
trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
Log:
Small change to handle NPE errors as reported in the dev list.
Modified: trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh
===================================================================
--- trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh 2006-03-24 04:37:21 UTC (rev 7061)
+++ trunk/applications/order/webapp/ordermgr/WEB-INF/actions/entry/catalog/productsummary.bsh 2006-03-24 06:25:27 UTC (rev 7062)
@@ -79,7 +79,8 @@
}
categoryId = null;
-if (product != null) {
+reviews = null;
+if (product != null) {
categoryId = request.getParameter("category_id");
if (categoryId == null) {
categoryId = request.getAttribute("productCategoryId");
@@ -105,11 +106,10 @@
context.put("price", priceMap);
}
+ // get the product review(s)
+ reviews = product.getRelatedCache("ProductReview", null, UtilMisc.toList("-postedDateTime"));
}
-// get the product review(s)
-reviews = product.getRelatedCache("ProductReview", null, UtilMisc.toList("-postedDateTime"));
-
// get the average rating
if (reviews != null && reviews.size() > 0) {
reviewIter = reviews.iterator();
More information about the Svn
mailing list