By seaneffel on
I see this message when upgrading from D6 to D7. The update script ran just fine, the site functions, but there are three instances of the following error message on every page:
Notice: Use of undefined constant user - assumed 'user' in eval() (line 2 of /Users/sean/dev/icateens_dev/modules/php/php.module(74) : eval()'d code).
Any ideas? Searches didn't turn up much.
Comments
It is likely you have a block
It is likely you have a block containing PHP code on those pages where you used a bare string. Check your blocks.
.
I've disabled all the blocks except the main content one, those three errors still come up.
+1
Worked for me!
Proper issue
Going to report a proper issue so this gets noticed. Here:
http://drupal.org/node/1430866
Go edit the php module and
Go edit the php module and add a
just before the eval. This allows you to see the call stack. Wrap in access control (eg check $GLOBALS['user']->uid == 1).
If you can't figure out the problem with this, paste the callstack here.
Line number to edit
Where to edit and put the above line in php module.
I have used the php filter option so i cant disable it.
This happens because in your
This happens because in your PHP code you wrote user instead of 'user' ... that's it: add the single quotes on each side and the problem is fixed.