How can I fix this code [duplicate]

prepare has always required two arguments, it just didn’t throw an error when used incorrectly until 3.5.

Basically, the use of prepare in this case is not doing anything. Since you’re not passing potentially unsafe data to the query, you can remove it entirely to get rid of the error and just pass your query directly to get_var.

$olddomain = $this->db->get_var( "SELECT option_value FROM {$this->db->options} WHERE option_name="siteurl" LIMIT 1" );

See the entry in wpdb Protect Queries Against SQL Injection Attacks for correct use of prepare.