• 29-01-2014, 09:59:19
    #1
    opencartta bir modülde Parse error: syntax error, unexpected T_STRING in /vhosts/xxxxxx.com/http/system/library/zend_library/Stdlib/ErrorHandler.php on line 10 hatası alıyorum.

    kodlar şu şekilde:

    <?php
    /**
     * Zend Framework (http://framework.zend.com/)
     *
     * @link      http://github.com/zendframework/zf2 for the canonical source repository
     * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
     * @license   http://framework.zend.com/license/new-bsd New BSD License
     */
    
    namespace Zend\Stdlib;
    
    use ErrorException;
    
    /**
     * ErrorHandler that can be used to catch internal PHP errors
     * and convert to a ErrorException instance.
     */
    abstract class ErrorHandler
    {
        /**
         * Active stack
         *
         * @var array
         */
        protected static $stack = array();
    
        /**
         * Check if this error handler is active
         *
         * @return bool
         */
        public static function started()
        {
            return (bool) static::getNestedLevel();
        }
    
        /**
         * Get the current nested level
         *
         * @return int
         */
        public static function getNestedLevel()
        {
            return count(static::$stack);
        }
    
        /**
         * Starting the error handler
         *
         * @param int $errorLevel
         */
        public static function start($errorLevel = \E_WARNING)
        {
            if (!static::$stack) {
                set_error_handler(array(get_called_class(), 'addError'), $errorLevel);
            }
    
            static::$stack[] = null;
        }
    
        /**
         * Stopping the error handler
         *
         * @param  bool $throw Throw the ErrorException if any
         * @return null|ErrorException
         * @throws ErrorException If an error has been catched and $throw is true
         */
        public static function stop($throw = false)
        {
            $errorException = null;
    
            if (static::$stack) {
                $errorException = array_pop(static::$stack);
    
                if (!static::$stack) {
                    restore_error_handler();
                }
    
                if ($errorException && $throw) {
                    throw $errorException;
                }
            }
    
            return $errorException;
        }
    
        /**
         * Stop all active handler
         *
         * @return void
         */
        public static function clean()
        {
            if (static::$stack) {
                restore_error_handler();
            }
    
            static::$stack = array();
        }
    
        /**
         * Add an error to the stack
         *
         * @param int    $errno
         * @param string $errstr
         * @param string $errfile
         * @param int    $errline
         * @return void
         */
        public static function addError($errno, $errstr = '', $errfile = '', $errline = 0)
        {
            $stack = & static::$stack[count(static::$stack) - 1];
            $stack = new ErrorException($errstr, 0, $errno, $errfile, $errline, $stack);
        }
    }
    yardımcı olabilecek varmı? teşekkürler.
  • 29-01-2014, 10:07:25
    #2
    Üyeliği durduruldu
    Php versiyonunuz nedir ? Genelde bu tarz hazır modüllerde sıkıntı çıkmaz, Php versiyonunuz 5.3 den geri ise, namespace desteklemiyor olabilir
  • 29-01-2014, 12:19:30
    #3
    php version 5.2.17 sanırım bundan kaynaklanıyor. sunucu sağlayıcımla görüşüp versiyon yükseltmesini talep ediyim. teşekkürler
  • 29-01-2014, 12:20:27
    #4
    Üyeliği durduruldu
    olcsanteknik adlı üyeden alıntı: mesajı görüntüle
    php version 5.2.17 sanırım bundan kaynaklanıyor. sunucu sağlayıcımla görüşüp versiyon yükseltmesini talep ediyim. teşekkürler
    rica ederim, kolay gelsin
  • 29-01-2014, 12:33:22
    #5
    Kimlik doğrulama veya yönetimden onay bekliyor.
    @olcsanteknik;

    @bknz: https://packagist.org/packages/zendf...rk/zend-stdlib

    php: >=5.3.3 sürümü için stabil çalışabileceği yazılmış