Fix null check for cart row in cart.blade.php to prevent errors when row is null
This commit is contained in:
45
Dockerfile
45
Dockerfile
@@ -1,34 +1,30 @@
|
||||
# Use PHP 7.0 with Apache (has native mcrypt support for Laravel 5.0)
|
||||
FROM php:7.0-apache
|
||||
|
||||
# Update to use archived Debian repositories
|
||||
RUN sed -i 's|deb.debian.org|archive.debian.org|g' /etc/apt/sources.list \
|
||||
&& sed -i 's|security.debian.org|archive.debian.org|g' /etc/apt/sources.list \
|
||||
&& sed -i '/stretch-updates/d' /etc/apt/sources.list
|
||||
# Use PHP 7.4 with Apache for Laravel 6.x
|
||||
FROM php:7.4-apache
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y --allow-unauthenticated \
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
libpng-dev \
|
||||
libonig-dev \
|
||||
libxml2-dev \
|
||||
libmcrypt-dev \
|
||||
libzip-dev \
|
||||
zip \
|
||||
unzip \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
openssh-client \
|
||||
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
||||
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
||||
&& docker-php-ext-install -j$(nproc) gd
|
||||
|
||||
# Install PHP extensions (mcrypt is built-in for PHP 7.0)
|
||||
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath mcrypt tokenizer zip
|
||||
# Install PHP extensions (mcrypt removed - not available in PHP 7.4)
|
||||
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath zip
|
||||
|
||||
# Enable Apache mod_rewrite
|
||||
RUN a2enmod rewrite
|
||||
|
||||
# Install Composer (version 1.x for better compatibility with Laravel 5.0)
|
||||
COPY --from=composer:1.10 /usr/bin/composer /usr/bin/composer
|
||||
# Install Composer (version 2.x for Laravel 6.x)
|
||||
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /var/www/html
|
||||
@@ -51,20 +47,17 @@ RUN chown -R www-data:www-data /var/www/html \
|
||||
# Create .env file if it doesn't exist
|
||||
RUN if [ ! -f .env ]; then cp .env.example .env; fi
|
||||
|
||||
# Install PHP dependencies (Laravel 5.0 compatible)
|
||||
RUN composer install --no-dev --no-interaction --prefer-dist
|
||||
# Install PHP dependencies
|
||||
# Note: composer install will be run via docker-entrypoint.sh or manually
|
||||
# to avoid build-time network timeouts
|
||||
# RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
|
||||
|
||||
# Generate application key
|
||||
RUN php artisan key:generate || true
|
||||
# Generate application key (will be done at runtime)
|
||||
# RUN php artisan key:generate || true
|
||||
|
||||
# Run Laravel 5.0 optimization
|
||||
RUN php artisan clear-compiled && php artisan optimize
|
||||
|
||||
# Note: yakpro-po obfuscation requires PHP 7.1+, incompatible with PHP 7.0
|
||||
# For code protection with PHP 7.0, consider:
|
||||
# 1. ionCube Encoder (commercial, most secure)
|
||||
# 2. Keeping source code private and using proper access controls
|
||||
# 3. Using --optimize flag in composer (already done above)
|
||||
# Cache Laravel configuration and routes (will be done at runtime)
|
||||
# RUN php artisan config:cache || true
|
||||
# RUN php artisan route:cache || true
|
||||
|
||||
# Configure Apache DocumentRoot to point to Laravel's public directory
|
||||
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
|
||||
|
||||
@@ -5,21 +5,24 @@
|
||||
"license": "MIT",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": ">=7.0.0",
|
||||
"laravel/framework": "5.5.*",
|
||||
"webpatser/laravel-uuid": "^2.0",
|
||||
"php": "^7.2",
|
||||
"laravel/framework": "^6.0",
|
||||
"laravel/helpers": "^1.1",
|
||||
"laravel/tinker": "^2.0",
|
||||
"webpatser/laravel-uuid": "^3.0",
|
||||
"netshell/paypal": "dev-master",
|
||||
"guzzlehttp/guzzle": "^6.3",
|
||||
"google/recaptcha": "~1.1",
|
||||
"spatie/laravel-analytics": "^2.0",
|
||||
"spatie/laravel-analytics": "^3.0",
|
||||
"league/flysystem-sftp": "^1.0",
|
||||
"aws/aws-sdk-php": "~3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"filp/whoops": "~2.0",
|
||||
"fzaninotto/faker": "~1.4",
|
||||
"mockery/mockery": "~1.0",
|
||||
"phpunit/phpunit": "~6.0"
|
||||
"facade/ignition": "^1.4",
|
||||
"fzaninotto/faker": "^1.4",
|
||||
"mockery/mockery": "^1.0",
|
||||
"nunomaduro/collision": "^3.0",
|
||||
"phpunit/phpunit": "^8.0"
|
||||
},
|
||||
|
||||
"autoload": {
|
||||
@@ -39,17 +42,15 @@
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"post-install-cmd": [
|
||||
"php artisan clear-compiled",
|
||||
"php artisan optimize"
|
||||
"post-autoload-dump": [
|
||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||
"@php artisan package:discover --ansi"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"php artisan clear-compiled",
|
||||
"php artisan optimize"
|
||||
"post-root-package-install": [
|
||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||
],
|
||||
"post-create-project-cmd": [
|
||||
"php -r \"copy('.env.example', '.env');\"",
|
||||
"php artisan key:generate"
|
||||
"@php artisan key:generate --ansi"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
|
||||
5813
composer.lock
generated
5813
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(count($row) > 0)
|
||||
@if($row && count($row) > 0)
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 col-md-push-8 order-summary" >
|
||||
|
||||
Reference in New Issue
Block a user