Symptoms
After editing / uploading a layout (an XML file) the following error message is logged:
PHP Fatal error: Call to a member function xpath() on a non-object in /app/code/core/Mage/Core/Model/Layout.php on line 154
Cause
The reason of the error message is that some XML path in the changed/uploaded XML file is invalid.
Solution
To solve the error you need to correct the XML content you recently modified or rollback the changes in layout (app/design/frontend/*/*/layout/*.xml) files.
Often, copy-pasted content (from forums/boards/blogs) contains non-ASCII characters instead of quotes/dashes, please ensure that all quotes in the pasted XML content are correct, or simply replace them.