woocommerce-multilingual
/
addons
/
wpml-dependencies
/
vendor
/
wpml
/
wp
/
classes
Last commit date
Attachment.php
1 month ago
Cache.php
1 month ago
Gutenberg.php
1 month ago
Hooks.php
1 month ago
Http.php
1 month ago
Nonce.php
1 month ago
Option.php
1 month ago
Post.php
1 month ago
PostType.php
1 month ago
Resources.php
1 month ago
Roles.php
4 years ago
Transient.php
1 month ago
Url.php
1 month ago
User.php
1 month ago
WP.php
1 month ago
WPDB.php
1 month ago
WPDB.php
17 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPML\LIB\WP; |
| 4 | |
| 5 | class WPDB { |
| 6 | |
| 7 | public static function withoutError( callable $func ) { |
| 8 | global $wpdb; |
| 9 | |
| 10 | $originalSuppressErrors = $wpdb->suppress_errors; |
| 11 | $wpdb->suppress_errors( true ); |
| 12 | $result = $func(); |
| 13 | $wpdb->suppress_errors( $originalSuppressErrors ); |
| 14 | return $result; |
| 15 | } |
| 16 | } |
| 17 |