You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,7 +12,6 @@ You're looking at a standalone PHP library to parse and evaluate text based rule
13
12
14
13
This library has initially been used to change and configure the behavior of certain "Workflows" (without changing actual code) in an intranet application, but it may serve a purpose elsewhere.
15
14
16
-
17
15
Find me on Twitter: @[nicoSWD](https://twitter.com/nicoSWD)
18
16
19
17
(If you're using PHP 5, you might want to take a look at [version 0.4.0](https://github.com/nicoSWD/php-rule-parser/tree/0.4.0))
@@ -39,7 +37,7 @@ This library works best with one of these bundles below, but they're not require
39
37
Test if a value is in a given array
40
38
```php
41
39
$variables = [
42
-
'coupon_code' => $_POST['coupon_code'],
40
+
'coupon_code' => (string) $_POST['coupon_code'],
43
41
];
44
42
45
43
$rule = new Rule('coupon_code in ["summer_discount", "summer21"]', $variables);
0 commit comments