WPIntell

Source evidence

Parser error when trying to Activate Plugin

Blue Storage · support · 2016-11-16T20:33:00+00:00

mixedsentiment
mediumseverity
0.85relevance
5replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

3 / 28 rows with source links

10.7% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

25 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
malkafly resolved
Hi! I just install, and when trying to activate its shows this: Parse error: syntax error, unexpected '[' in /var/www/html/wp-content/plugins/blue-storage/blue-storage.php on line 616 I used your plugin on another site months ago and it worked perfectly, thank you! But today on a new website, i got this. Thanks! What version of PHP is used? Can you also just verify that the line in that file is unchanged? You can compare it against the file stored in SVN. php 5.3.3, maybe it’s. I will try to move entire website this weekend to a Azure Web App with php 5.6. and the line/function (ln 610 to 622) are: function windows_azure_storage_srcset($sources) { $azure_metadata = get_metadata('post',get_the_ID(),'windows_azure_storage_info'); if( !empty($azure_metadata) ) { foreach ($sources as &$source) { [line 616 -->] $source['url'] = str_replace(wp_upload_dir()['baseurl'], WindowsAzureStorageUtil::getStorageUrlPrefix(), $source['url']); } } return $sources; } add_filter('wp_calculate_image_srcset', 'windows_azure_storage_srcset'); Yeah, that looks right. I think it’s the PHP version. I think it doesn’t like this: wp_upload_dir()['baseurl'] Which we can easily split up to make it work, but that causes other problems. I think the best option is definitely moving to PHP 5.6 like you are planning. yes, well i will remove, then try again after migrate, thanks derek! You’re welcome!

Comments

5 shown
derekheld 2016-11-16T21:01:00+00:00

What version of PHP is used? Can you also just verify that the line in that file is unchanged? You can compare it against the file stored in SVN.

malkafly 2016-11-16T21:12:00+00:00

php 5.3.3, maybe it’s. I will try to move entire website this weekend to a Azure Web App with php 5.6. and the line/function (ln 610 to 622) are: function windows_azure_storage_srcset($sources) { $azure_metadata = get_metadata('post',get_the_ID(),'windows_azure_storage_info'); if( !empty($azure_metadata) ) { foreach ($sources as &$source) { [line 616 -->] $source['url'] = str_replace(wp_upload_dir()['baseurl'], WindowsAzureStorageUtil::getStorageUrlPrefix(), $source['url']); } } return $sources; } add_filter('wp_calculate_image_srcset', 'windows_azure_storage_srcset');

derekheld 2016-11-16T21:47:00+00:00

Yeah, that looks right. I think it’s the PHP version. I think it doesn’t like this: wp_upload_dir()['baseurl'] Which we can easily split up to make it work, but that causes other problems. I think the best option is definitely moving to PHP 5.6 like you are planning.

malkafly 2016-11-16T21:56:00+00:00

yes, well i will remove, then try again after migrate, thanks derek!

derekheld 2016-11-16T22:08:00+00:00

You’re welcome!