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

quicksketch’s picture

Status: Active » Closed (won't fix)

As mentioned in the submission guidelines, I don't provide help with custom coding:

Any issues regarding "how do I code ..." or "how do I theme ..." will not be answered. Please look elsewhere for coding resources.

Please refer to other resources such as IRC or Drupal StackExchange to ask your questions.