: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
public function __construct( WPDB $wpdb, $post_id ) {
$this->post_id = $post_id;
* @param array $post_data_array
* @param bool $direct_db_update
public function update( array $post_data_array, $direct_db_update = false) {
if ( $direct_db_update ) {
$this->wpdb->update( $this->wpdb->posts, $post_data_array, array( 'ID' => $this->post_id ) );
clean_post_cache( $this->post_id );
$post_data_array['ID'] = $this->post_id;
wpml_update_escaped_post( $post_data_array );