Replace not initialized var $trimExtension