This problem was already fixed in the source code, see the reported issue.
You have mainly 3 solutions:
Mid term solution
According to the road map, QGIS 2.18.1 will be released in 25.11.2016, you'll get the fix with such version. Simply wait 22 days for it, OK?
BUT
This is free software
, so you can get the fix instantly!
Short term solutions
Install a nightly build. Check what packages are available for your operating system here.
Edit the file yourself.
If you're on GNU/Linux, go to /usr/share/qgis/python/plugins/processing/algs/qgis/Difference.py
(on Windows it will be C:\Program Files\QGIS 2.18\apps\qgis\python\plugins\processing\algs\qgis\Difference.py
), and make sure line 32 looks like this:
from qgis.core import QGis, QgsFeatureRequest, QgsFeature, QgsGeometry, QgsWKBTypes
If you don't want to edit the file, you can just replace it, downloading the fixed file from here (right click on the link and select Save Link As...
).
You will need administrator privileges to either edit or replace the file. After this, restart QGIS.