Php Strict Standards: Only variables shocould be passed by reference in solution, strictvariables
This problem is mostly caused by referencing and passing parameters. The solution is to modify the code without using references. The other solution is to modify the php configuration file and change the error_reporting value to error_reporting = E_ALL &~ E_NOTICE. Or modify the reference method in the function.
Ps: when modifying the configuration file, it is best to copy a row, note it, and then change it, if you need to switch back at any time.
ECShop Strict Standards: Only variables shocould be passed by reference in Solution
When installing ecshop today, the following error occurs: Strict Standards: Only variables shocould be passed by reference in F: \ www.xxxx.com \ cls_template.php on line 418.
Solution:
Open the cls_template.php file and find the following code:
$tag_sel = array_shift(explode(' ', $tag));
I forgot to mention that my PHP version is 5.4.19 and PHP5.3 and above can only pass specific variables by default, but cannot pass through the function return value, so the explode in this code has to be moved out and assigned a new value.
$tagArr = explode(' ', $tag);$tag_sel = array_shift($tagArr);
In this case, the top error is lost, and the errors on the left and bottom still need to be removed by clicking clear cache in the ecshop background.
The following code also reports an error in php5.3 or later versions.
$file_suffix = strtolower(array_pop(explode('.', $file_name)));
Modification method:
$fnarray=explode('.', $file_name);$file_suffix = strtolower(array_pop($fnarray));
Now, you can understand it. In the future, you need to write the parameters separately. You cannot write a row.