API page: http://api.drupal.org/api/drupal/includes--stream_wrappers.inc/function/...
The function, instead of updating the value of the argument passes by reference, initialize the value of a local variable.
public function stream_open($uri, $mode, $options, &$opened_path) {
$this->uri = $uri;
$path = $this->getLocalPath();
$this->handle = ($options & STREAM_REPORT_ERRORS) ? fopen($path, $mode) : @fopen($path, $mode);
if ((bool) $this->handle && $options & STREAM_USE_PATH) {
$opened_url = $path;
}
return (bool) $this->handle;
}
The parameter is &$opened_path, but the used variable is $opened_url. This means the caller doesn't get back the path of the file being opened.
Comments
Comment #1
jbrown commentedComment #2
avpadernoComment #3
jbrown commentedComment #4
xjmTagging issues not yet using summary template.
Comment #5
dries commentedGood catch. Committed to 7.x and 8.x.