I would like to make a very easy and super fast fix suggestion to the wp-all-import team.
To offer some kind of compatibility to your HHVM users, without compromising the filters functionality you have for the standard PHP users, I suggest the following check to see if hhvm is managing the content.
if (defined('HHVM_VERSION')) ....
This will return true if there is some hhvm installation active. It returns true only when hhvm is up, not just when installed! So if we stop hhvm and have php take over, it will return false, so you know exactly WHEN hhvm is taking over or php is taking over!!!
With that, in the 3 separate locations (was 2, now its 3) of the path in the chunk.php, you can do the following….
CHANGE THIS
if (function_exists('stream_filter_register') and $this->options['filter']){
stream_filter_register('preprocessxml', 'preprocessXml_filter');
$path = 'php://filter/read=preprocessxml/resource=' . $this->file;
}
else $path = $this->file;
TO THIS
if (function_exists('stream_filter_register') and $this->options['filter']){
stream_filter_register('preprocessxml', 'preprocessXml_filter');
if (defined('HHVM_VERSION'))
$path = $this->file;
else
$path = 'php://filter/read=preprocessxml/resource=' . $this->file;
}
else $path = $this->file;
So, if there is a defined version of hhvm actively managing the php content, do the quickfix ($path=$this->file), otherwise keep the standard filtered action.
This is a WIN-WIN situaton.
1) You will keep the filter functionality
2) while at the same time (for those who know the fix), you will help the hhvm users not to change the code every time there is a plugin update.
3) (for those who don’t know the fix), will stop pulling their hair