4

When trying to apply the patch for PHP 5.4 compatibility of Magento 1.7.0.2, I get the following shell output:

user@server [~/public_html]# sh magento-php54-patch.sh
: command not found.sh: line 7:
'agento-php54-patch.sh: line 9: syntax error near unexpected token `{
'agento-php54-patch.sh: line 9: `_check_installed_tools() {

I obtained the patch file by copy/pasting into my Windows text editor, then uploading to my CentOS web server. OS-specific text file formatting issues, perhaps?

As requested, first part of script:

#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.

# 1. Check required system tools
_check_installed_tools() {
    local missed=""

    until [ -z "$1" ]; do
        type -t $1 >/dev/null 2>/dev/null
        if (( $? != 0 )); then
            missed="$missed $1"
        fi
        shift
    done

    echo $missed
}
3

If you are using PHPStorm as IDE you can always apply the patch through "VCS \ Apply Patch ..".

  • Not using PHPStorm, unfortunately. :-( – Jason M. Dec 18 '14 at 21:13

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.