0

I have been getting this error pointing to this function

protected function _checkSrcIsFile($src)
{
    $result = false;
    if (is_string($src) && is_readable($src) && is_file($src)) {
        $result = true;
    }

    return $result;
}

and the funtion is being passed here:

$srcIsFile = $this->_checkSrcIsFile($src);
if ($srcIsFile) {
    $src = realpath($src);
    $result = $this->cp($src, $filename);
} else {
    $result = $this->filePutContent($filename, $src);
}

if (!is_null($mode) && $result !== false) {
    $this->chmod($filename, $mode);
}

return $result;

can anyone explain to me what is causing this and what is the solution and how can I recreate it.

Thank you.

0

I've you use an older Magento version (<1.9.3.1?) this seems to be a bug in Varian lib.

Current version supresses is_readable error (@ is_readable())...<

protected function _checkSrcIsFile($src)
{
    $result = false;
    if (is_string($src) && @is_readable($src) && is_file($src)) {
        $result = true;
    }

    return $result;
}

Edit:

No, it is still there ... it's "fixed" only in LTS project ...

See https://github.com/OpenMage/magento-lts/pull/85

Instead of supreess error it should also work to check if(file_exists($src)) before is_readable().

  • I am using Magento EE 1.14.xx and this is not helping the error is still there when I create invoices on the back end. – Maneza F8 Jun 14 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.