php - Node insert continues to call nodeapi even if query failed
I have a custom nodapi function for performing additional opporations when a type of content type is inserted. However, I've had the following error occur "Warning in test1\includes\common.inc on line 3538.". I've tracked this down several times to being an encoding issue, and I'm not sure how to resolve that though.
However, what I don't get is even though the query fails, nodeapi still gets called and I get a blank nid. This also causes other inserts to fail because nid and vid are 0 or null.
I understand that the causing issue is the encoding, but I don't understand why Drupal still runs nodeapi if the node insert (I believe) is failing and no nid or vid is produced.
Any help would be appreciated.