osclass / Osclass

With Osclass, get your own classifieds site for free. Build your own Osclass installation and start advertising real estate, jobs or whatever you want- in minutes!
http://osclass.org/
648 stars 344 forks source link

itemActions.php need to filter meta request #2253

Closed plonknimbuzz closed 6 years ago

plonknimbuzz commented 6 years ago

https://github.com/osclass/Osclass/blob/cbf31336888fc3e5f730ea8b35e4d06610b87935/oc-includes/osclass/ItemActions.php#L151

$meta = Params::getParam("meta");

if($meta!='' && count($meta)>0) {
//if(is_array($meta) && !empty($meta)) { //PHP 7.2 supp >> recommend
    foreach($_meta as $_m) {
        $meta[$_m['pk_i_id']] = (isset($meta[$_m['pk_i_id']]))?$meta[$_m['pk_i_id']]:'';
    }

    $mField = Field::newInstance();
    ....
}
garciademarina commented 6 years ago

Hi there, I don't see any reason why we should change it. $_meta variable will be an empty array if no custom fields are attached to the selected category. Regards