The error occurs when editing a pledge payment that is associated with an opportunity. If the pledge payment doesn't have an opportunity associated with it then the error does not occur.
Download and install the latest patch which contains all fixes from previous patches. If you are running an older version, download and install the latest version and then the patch.
Steps to Duplicate
1. Navigate to Revenue > Add a pledge 2. Fill out the required fields and also select an Opportunity and then save the pledge 3. Select Add a payment from the Tasks frame 4. Enter required fields and then save the payment 5. Select "Go to revenue" from the Application details section of the payment 6. On the Details tab, select Edit > choose a revenue category and then save to receive the error