PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.18
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.18
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/models/FrmDb.php +6 -7 6.256.18 View file →
@@ -252,9 +252,9 @@
252 252 * @param string $field
253 253 * @param array $args
254 254 * @param string $limit
255 255 *
256 - * @return array
256 + * @return mixed
257 257 */
258 258 public static function get_col( $table, $where = array(), $field = 'id', $args = array(), $limit = '' ) {
259 259 return self::get_var( $table, $where, $field, $args, $limit, 'col' );
260 260 }
@@ -270,8 +270,9 @@
270 270 * @return mixed
271 271 */
272 272 public static function get_row( $table, $where = array(), $fields = '*', $args = array() ) {
273 273 $args['limit'] = 1;
274 +
274 275 return self::get_var( $table, $where, $fields, $args, '', 'row' );
275 276 }
276 277
277 278 /**
@@ -283,9 +284,9 @@
283 284 * @param array $where
284 285 * @param string $fields
285 286 * @param array $args
286 287 *
287 - * @return array
288 + * @return mixed
288 289 */
289 290 public static function get_results( $table, $where = array(), $fields = '*', $args = array() ) {
290 291 return self::get_var( $table, $where, $fields, $args, '', 'results' );
291 292 }
@@ -654,18 +655,16 @@
654 655 *
655 656 * @return mixed $results The cache or query results
656 657 */
657 658 public static function check_cache( $cache_key, $group = '', $query = '', $type = 'get_var', $time = 300 ) {
658 - $found = null;
659 - $results = wp_cache_get( $cache_key, $group, false, $found );
660 -
661 - if ( ( $found === true && $results !== false ) || empty( $query ) ) {
659 + $results = wp_cache_get( $cache_key, $group );
660 + if ( ! FrmAppHelper::is_empty_value( $results, false ) || empty( $query ) ) {
662 661 return $results;
663 662 }
664 663
665 664 if ( 'get_posts' == $type ) {
666 665 $results = get_posts( $query );
667 - } elseif ( 'get_associative_results' === $type ) {
666 + } elseif ( 'get_associative_results' == $type ) {
668 667 global $wpdb;
669 668 $results = $wpdb->get_results( $query, OBJECT_K ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
670 669 } else {
671 670 global $wpdb;