Changeset 47343 for branches/3.7/tests/phpunit/includes/factory.php
- Timestamp:
- 02/22/2020 12:05:12 PM (6 years ago)
- Location:
- branches/3.7
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/includes/factory.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.7
- Property svn:mergeinfo changed
-
branches/3.7/tests/phpunit/includes/factory.php
r25660 r47343 160 160 161 161 function create_object( $args ) { 162 global $wpdb; 162 163 $meta = isset( $args['meta'] ) ? $args['meta'] : array(); 163 164 $user_id = isset( $args['user_id'] ) ? $args['user_id'] : get_current_user_id(); 164 return wpmu_create_blog( $args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id'] ); 165 // temp tables will trigger db errors when we attempt to reference them as new temp tables 166 $suppress = $wpdb->suppress_errors(); 167 $blog = wpmu_create_blog( $args['domain'], $args['path'], $args['title'], $user_id, $meta, $args['site_id'] ); 168 $wpdb->suppress_errors( $suppress ); 169 return $blog; 165 170 } 166 171
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)