Msgstr "Timed call divert has been deleted"

I am trying to deploy Wordpress on Dotcloud using this repo, but there is an error in the logs:

18:59:19: [www.0] Running postinstall script... 18:59:21: [www.0] PHP Fatal error: Call-time pass-by-reference has been removed in /home/dotcloud/rsync-1353715101184/dotcloud-scripts/feed-wp-config.php on line 86 

Looking at line 86 in the feed-wp-config.php file , it reads:

 $content = preg_replace('/(define\(\'' . $property . '\', \')(.*)(\'\);)/', '${1}' . $value . '${3}', $content, -1, &$count); 

When I go to the Wordpress start page, it says: β€œIt seems that there is no wp-config.php file. I need this before we can start.”

I cross-posted this on the Github ref controller , but since there is no answer yet, I am sending a message here as well, hoping that someone knows the answer.

+4
source share
2 answers

Replace &$count only $count . & means you want to pass a variable by reference, not a value:

Documentation says

There is no reference mark in the function call - only the definition function. Function definitions are enough to correctly pass an argument by reference. Starting with PHP 5.3.0, you will get a warning saying that "call-time-pass-by-reference" is deprecated when you use & in foo (& $ a) ;.

So, if you want to pass a variable by reference to a function, you must use & in the function declaration:

Now this should be done as follows:

 // right function foo(&$var) { ... } foo($foo); 

but not like this (how do you get this warning):

 function foo($var) { ... } foo(&$foo); // <--- wrong 
+13
source

Remove the character and sign from &$count at the end of the line.

Please keep in mind that this is the main hack in wordpress and it will be lost when updating. .

+3
source

All Articles