How can I get rid of this error?
The solution for this will be to do the same thing with the code below.



$region = _block_get_renderable_array(_block_render_blocks(array($block)));
print render($region); 


After changing your code make sure that you clear your cache. And try refreshing. Also make sure you have made this changes every where.

So you know what the problem is:
The render() function takes a parameter by reference. In that case you must pass in a variable, not a function call, because the function call is not something that can be passed as a reference.