Jump to content
Virginijus

Parse error: syntax error, unexpected '[' in .../index.php on line 51

Recommended Posts

Gal kas esate susidūrę su tokia klaida instaliuojant prestashop_1.7.4.1

Naršyklė išmeta klaidą  Parse error: syntax error, unexpected '[' in /..../index.php on line 51

Vevykdo index.php instaliavimo metu.

Pažiūrėjau failą, 51 eilutė yra aprašytas masyvas iš archivaroriaus klaidų kodų. 

 

function getZipErrorMessage($errorCode) {
    $errors = [
        ZipArchive::ER_EXISTS => "File already exists.",
        ZipArchive::ER_INCONS => "Zip archive inconsistent or corrupted. Double check your uploaded files.",
        ZipArchive::ER_INVAL => "Invalid argument.",
        ZipArchive::ER_MEMORY => "Allocation error. Out of memory?",
        ZipArchive::ER_NOENT => "Unable to find the release zip file. Make sure that the prestashop.zip file has been uploaded and is located in the same directory as this dezipper.",
        ZipArchive::ER_NOZIP => "The release file is not a zip file or it is corrupted. Double check your uploaded files.",
        ZipArchive::ER_OPEN => "Can't open file. Make sure PHP has read access to the prestashop.zip file.",
        ZipArchive::ER_READ => "Read error.",
        ZipArchive::ER_SEEK => "Seek error.",
    ];

    if (isset($errors[$errorCode])) {
        return "Unzipping error - " . $errors[$errorCode];
    }

    return "An unknown error was found while reading the zip file";
}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More