Call to undefined function nocache_headers() in... wp-admin/admin.php on line 32

Please help... What is this and how do I fix? i was trying to automatically update to 3.5 on a very old WP site.