Closed (won't fix)
Project:
Webform
Version:
7.x-3.13
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2011 at 21:50 UTC
Updated:
29 Nov 2011 at 02:06 UTC
I created a markup field in Webform. This field allows PHP code.
The following code
$imid = '115';
$inode = node_load($imid);
$iurl = $inode->field_lvimage['und'][0]['uri'];
gettype($imid) . ' ' . $imid . ' ' . file_create_url($iurl);
prints:
string 115 http://localhost:8005/sites/default/files/lv/144%20Vroman%20130.jpg
but with a request url with ...?imid=115
$imid = '%get[imid]';
$inode = node_load($imid);
$iurl = $inode->field_lvimage['und'][0]['uri'];
gettype($imid) . ' ' . $imid . ' ' . file_create_url($iurl);
prints:
string 115 http://localhost:8005/
With an error message:
Notice: Trying to get property of non-object in eval() (regel 4 van /home/jos/html/lv/modules/php/php.module(74) : eval()'d code).
Why isn't node_load returning an object in this case? What am I doing wrong?
Comments
Comment #1
quicksketchAs mentioned in the submission guidelines, I don't provide help with custom coding:
Please refer to other resources such as IRC or Drupal StackExchange to ask your questions.