- if ( $nt ) {
- $this->id = $id;
- // is_string() check is back-compat for ApprovedRevs
- if ( is_string( $c ) ) {
- $this->content = new TextContent( $c );
- } else {
- $this->content = $c ?: false;
- }
- $this->title = $nt;
- } else {
- wfDebug( "SearchUpdate object created with invalid title '$title'\n" );
+ $this->id = $id;
+ // is_string() check is back-compat for ApprovedRevs
+ if ( is_string( $c ) ) {
+ wfDeprecated( __METHOD__ . " with a string for the content", '1.34' );
+ $c = new TextContent( $c );
+ } elseif ( is_bool( $c ) ) {
+ wfDeprecated( __METHOD__ . " with a boolean for the content", '1.34' );
+ $c = null;