@@ -211,7 +211,9 @@ public function getParam($name, $id = 0)
211211 return false ;
212212 }
213213
214- $ params = $ this ->getItemArray ('params ' , $ this ->paramTable , 'id ' , $ id );
214+ $ column = ($ this ->paramTable === '#__extensions ' ) ? 'extension_id ' : 'id ' ;
215+
216+ $ params = $ this ->getItemArray ('params ' , $ this ->paramTable , $ column , $ id );
215217
216218 return $ params [$ name ];
217219 }
@@ -236,7 +238,9 @@ public function setParams($paramArray = null, $type = 'edit', $id = 0)
236238 return false ;
237239 }
238240
239- $ params = $ this ->getItemArray ('params ' , $ this ->paramTable , 'id ' , $ id );
241+ $ column = ($ this ->paramTable === '#__extensions ' ) ? 'extension_id ' : 'id ' ;
242+
243+ $ params = $ this ->getItemArray ('params ' , $ this ->paramTable , $ column , $ id );
240244
241245 if ($ paramArray ) {
242246 foreach ($ paramArray as $ name => $ value ) {
@@ -262,7 +266,7 @@ public function setParams($paramArray = null, $type = 'edit', $id = 0)
262266 $ query = $ db ->getQuery (true )
263267 ->update ($ db ->quoteName ($ this ->paramTable ))
264268 ->set ('params = :params ' )
265- ->where (' id = :id ' )
269+ ->where ($ column . ' = :id ' )
266270 ->bind (':params ' , $ paramsString )
267271 ->bind (':id ' , $ id , ParameterType::INTEGER );
268272
0 commit comments