benbalter/WP-Document-Revisions — pull request #42 by rachelbaker (2013-01-16 21:32:02+00:00)
Title: Adding a new document won't have a file attached yet.

On the Add New Document screen the Document_Revisions->permalink() method is calling the get_file_type() method. If there isn't a file attached yet, the get_file_type() method should return false.

I am honestly, not sure if this is the BEST solution, but it is a demonstration of a possible approach.

Currently the following PHP Debug errors are thrown when on the dashboard Add New Document screen:

> Warning: Cannot modify header information - headers already sent by (output started at /plugins/wp-document-revisions/wp-document-revisions.php:372) in /wp-includes/option.php on line 568

> Notice: Trying to get property of non-object in /plugins/wp-document-revisions/wp-document-revisions.php on line 372