I have Magento 1.9.3.1 CE installed and unaltered in my Uwamp localhost.
I was just casually testing some functions from the app/code/core/Mage/Core/functions.php file, by calling those functions in my root script as below:
<?php
require_once 'app/Mage.php';
Varien_Profiler::enable();
Mage::setIsDeveloperMode(true);
error_reporting(E_ALL);
ini_set('display_errors', 1);
umask(0);
Mage::app('default');
echo Mage::helper('core')->__('any text to be printed');
echo Mage::helper('core')->now();
But when I called the now
method of the same functions.php
file, I got the below error:
Fatal error: Uncaught Error: Call to undefined method Mage_Core_Helper_Data::now() in C:\UwAmp\www\[magento-root]\test.php on line 11
I was astonished, confused and annoyed to find that even though functions.php
actually contains the function now
, it doesn't allow it to be called from any other file(or root script as in my case).
Please check here to ascertain that now
function actually exists in functions.php
file.
What on the earth could be possible cause for this weird scenario?