Task #679320 by cytefx,Pasqualle: Apply patch, also change the passing by reference in the page alter function, to make compatiable with php 5.3