Strict warning: Only variables should be passed by reference
That's not a Drupal error. It's a PHP error. You're getting it because the reset function expects an array to be passed by reference. You are passing it the return value of the array_keys function, which does not return its result by reference.

If you want to break down your code to avoid this error, try something like this:

$array_keys = array_keys($result['fieldable_panels_pane']);
$promobox_id = reset($array_keys);


Also, consider seeing this page for more information: http://www.php.net/manual/en/language.references.pass.php