Plugin Directory

Changeset 2523443


Ignore:
Timestamp:
04/29/2021 12:54:49 PM (5 years ago)
Author:
aaf017
Message:

Handle multivalued fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-cassify/trunk/classes/wp_cassify_rule_solver.php

    r2287310 r2523443  
    9797        if ( ( is_array( $matches_cas_variable_groups[1] ) ) && ( count( $matches_cas_variable_groups[1] ) == 1 ) ) {
    9898            // Replace with real value if it's a CAS variable and not a constant.
    99             $wp_cassify_rule_operand = $this->cas_user_datas[ $matches_cas_variable_groups[1][0] ];
     99            //$wp_cassify_rule_operand = $this->cas_user_datas[ $matches_cas_variable_groups[1][0] ];
     100
     101            // Handle multivalued fields
     102            if ( is_array( $this->cas_user_datas[ $matches_cas_variable_groups[1][0] ] ) )
     103                $wp_cassify_rule_operand = maybe_serialize( $this->cas_user_datas[ $matches_cas_variable_groups[1][0] ] );
     104            else
     105                $cas_user_data_formatted = $this->cas_user_datas[ $matches_cas_variable_groups[1][0] ];
    100106        }
    101107    }   
Note: See TracChangeset for help on using the changeset viewer.