Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Fatal error: Access to undeclared static property: Smarty::$_IS_WINDOWS #34

Closed
fnami0316 opened this issue May 14, 2015 · 3 comments

Comments

@fnami0316
Copy link

Please forgive my clumsy English .

where it was set as follows in composer.json, since version 3.1.23 has been installed , I have been recognized as this is the latest stable version.

"require": {
"smarty / smarty": "~ 3.1"
}

However , errors that did not occur in version 3.1.21 has occurred .

PHP Fatal error: Access to undeclared static property: Smarty :: $ _ IS_WINDOWS in .....

Since there is no way , I have specified to use the 3.1.21 to composer.json.

"require": {
"smarty / smarty": "3.1.21"
}

Do not the people who have the same problem ?

@uwetews
Copy link
Contributor

uwetews commented May 14, 2015

I can't reproduce your problem. Smarty :: $ _ IS_WINDOWS is declared in line 206 of the Smarty class.

Which peace of code does create the error?

@fnami0316
Copy link
Author

Which peace of code does create the error?

The error has occurred at "vendor/smarty/smarty/libs/sysplugins/smarty_internal_write_file.php on line 56".

   /*
     * Windows' rename() fails if the destination exists,
     * Linux' rename() properly handles the overwrite.
     * Simply unlink()ing a file might cause other processes
     * currently reading that file to fail, but linux' rename()
     * seems to be smart enough to handle that for us.
     */
    if (Smarty::$_IS_WINDOWS) {  // ←this line!
        // remove original file
        @unlink($_filepath);
        // rename tmp file
        $success = @rename($_tmp_file, $_filepath);
    } else {
        // rename tmp file

@uwetews
Copy link
Contributor

uwetews commented Jun 4, 2015

All other applications don't have this problem I close this issue for now.

@uwetews uwetews closed this as completed Jun 4, 2015
think-mcunanan pushed a commit to think-mcunanan/smarty that referenced this issue Mar 22, 2023
…i)-eliminate-the-part-that-assumes-a-single-kanzashi-account

Redmine #5159 (kirei) eliminate the part that assumes a single kanzashi account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants