PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.21.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.21.1
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/helpers/FrmStringReaderHelper.php +1 -5 6.326.21.1 View file →
@@ -45,18 +45,15 @@
45 45 * Read characters until we reach the given character $char.
46 46 * By default, discard that final matching character and return the rest.
47 47 *
48 48 * @param string $char
49 - *
50 49 * @return string
51 50 */
52 51 public function read_until( $char ) {
53 52 $value = '';
54 -
55 53 while ( $this->pos <= $this->max && ( $one = $this->string[ $this->pos++ ] ) !== $char ) {
56 54 $value .= $one;
57 55 }
58 -
59 56 return $value;
60 57 }
61 58
62 59 /**
@@ -64,9 +61,8 @@
64 61 * whichever comes first.
65 62 * By default, remove enclosing double-quotes from the result.
66 63 *
67 64 * @param int $count
68 - *
69 65 * @return string
70 66 */
71 67 public function read( $count ) {
72 68 $value = '';
@@ -84,9 +80,9 @@
84 80 * abc => abc
85 81 * "abc" => abc
86 82 * ""abc"" => "abc"
87 83 */
88 - if ( strlen( $value ) < 2 || ! str_starts_with( $value, '"' ) || ! str_ends_with( $value, '"' ) ) {
84 + if ( strlen( $value ) < 2 || substr( $value, 0, 1 ) !== '"' || substr( $value, -1, 1 ) !== '"' ) {
89 85 // Only remove exactly one quote from the start and the end and then only if there is one at each end.
90 86 // Too short, or does not start or end with a quote.
91 87 return $value;
92 88 }