Event: Node is being viewed.
Action: set data on Node:title and got.
Fatal error: Your exception class uses incorrect types for common properties: 'message' and 'file' need to be a string and 'line' needs to be an integer. in /var/www/d7_dev/sites/all/modules/rules/rules/includes/rules.core.inc on line 623
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | translate_in_construct.patch | 1015 bytes | berdir |
Comments
Comment #1
fagoI just gave it a test and it worked fine for me? Could you provide some more infos? Maybe you have a debug backtrace?
Comment #2
berdirJust had the same when doing the following:
1. Fetch entity by id
2. select entity user, continue
3.
Comment #3
berdirAh, this only happens when xdebug is enabled.
http://xdebug.org/archives/xdebug-dev/1539.html
Comment #4
berdirAnd commenting out the line unset($this->message) fixes it. What is that supposed to do? :)
Comment #5
fagohm, I removed the message property so the magic getter is invoked instead as I found no other way to override the message that is output when the exception is printed. In the meantime the drupal error handling got improved, maybe this helps here? Anyway those errors are unacceptable, so feel free to roll a patch to remove that magic.
Comment #6
berdirIt should be possible to override the __toString() method: http://www.php.net/manual/en/language.exceptions.extending.php
Comment #7
fagoI tried that but it wasn't picked up (perhaps a bug?). Anyway, it's documented that way, so let's do it that way.
Comment #8
berdirAh, I guess core doesn't use _toString() but getMessage() :)
Anyway, what about simply setting $this->message in the constructor then? Not a perfect solution, but works...
Comment #9
fagoComment #10
fagoMakes sense. Thanks committed.
Comment #12
Neil_in_Chicago commentedI had the same error adding modules to a new install (everything the latest). There are four varying reports of this bug.
See Please add faces to the module dependency list, December 2010.
Comment #13
fagoThen it should suffice to re-open one issue I guess?