PHP Fatal error: Call to undefined function array_except()

Hello

I have just build a theme and trying to FTP move on staging.

I keep receiving this error:

PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError:
 Call to undefined function array_except() in /home/.../web/app/uploads/cache/e117d429b9cfdfa2a14babb104e5efa82d622a76.php:40

Stack trace:
#0 .../web/app/themes/sage/vendor/illuminate/view/Engines/PhpEngine.php(43): include()
#1 .../web/app/themes/sage/vendor/illuminate/view/Engines/CompilerEngine.php(59): Illuminate\View\Engines\PhpEngine->evaluatePath('/home/vlyjkesc/...', Array)
#2 .../web/app/themes/sage/vendor/illuminate/view/View.php(142): Illuminate\View\Engines\CompilerEngine->get('/home/vlyjkesc/...', Array)
#3 .../web/app/themes/sage/vendor/illuminate/view/View.php(125): Illuminate\View\View->getContents()
#4 .../web/app/themes/sage/vendor/illuminate/view/View.php(90): Illuminate\View\View->renderContents()
#5 .../we in /home/vlyjkesc/staging.atravisio.com/web/app/uploads/cache/e117d429b9cfdfa2a14babb104e5efa82d622a76.php on line 40

Any hint on how to debug this?
ty

Could this help?


After dumping the composer autoloader, upload the files to server again.

I would start by looking at the file and line that the error is reporting as containing the undefined function:

PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError:
 Call to undefined function array_except() in /home/.../web/app/uploads/cache/e117d429b9cfdfa2a14babb104e5efa82d622a76.php:40

So you want to look at line 40 in the file web/app/uploads/cache/e117d429b9cfdfa2a14babb104e5efa82d622a76.php (which is a compiled blade).

which ones? :smiley:

all the website?
just the vendor folders?

here you go with the line:

<?php echo $__env->make('partials.servizi', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

what I am supposed to find here? :smiley:
had a look at it, but couldn’t find something useful :frowning:

THe vendor/ folder of the bedrock site, and if this doesn’t help then also the vendor/ folder of your sage theme. Remove and re-run composer install.

guys thank you for your time and constant patience, but I had to “brutalize” the theme, by re-starting from scratch -> new bedrock -> composer install -> new sage -> yarn install -> moved my theme in it.

seems to work now :slight_smile:

This topic was automatically closed after 42 days. New replies are no longer allowed.