0

I installed a Magento extension and after running php bin/magento setup:upgrade, I get the following errors. I've tried hours trying to find a solution. I even got my server company to help, but no luck.

I'm running Magento 2.3.4 with PHP version 7.2

PHP Fatal error: Uncaught Error: Call to undefined function JsonSchema\Uri\filter_var() in /home/thesuitexchange/thesuitexchange/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriResolver.php:82
 Stack trace:
 #0 /home/thesuitexchange/thesuitexchange/vendor/justinrainbow/json-schema/src/JsonSchema/SchemaStorage.php(100): JsonSchema\Uri\UriResolver->resolve('file:///home/th...', 'internal://prov...')
 #1 /home/thesuitexchange/thesuitexchange/vendor/justinrainbow/json-schema/src/JsonSchema/SchemaStorage.php(72): JsonSchema\SchemaStorage->expandRefs(Object(stdClass), 'internal://prov...')
 #2 /home/thesuitexchange/thesuitexchange/vendor/justinrainbow/json-schema/src/JsonSchema/Validator.php(58): JsonSchema\SchemaStorage->addSchema('internal://prov...', Object(stdClass))
 #3 /home/thesuitexchange/thesuitexchange/vendor/justinrainbow/json-schema/src/JsonSchema/Validator.php(78): JsonSchema\Validator->validate(Object(stdClass), Object(stdClass))
 #4 /home/thesuitexchange/thesuitexchange/vendor/composer/composer/src/Composer/Json/Jso in /home/thesuitexchange/thesuitexchange/vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriResolver.php on line 82
Kishor Thummar
3,0301 gold badge11 silver badges19 bronze badges
asked Feb 7, 2020 at 22:10
2
  • I think "filter" extension not enabled on your PHP. Commented Feb 8, 2020 at 6:31
  • you need to uninstall that module. Commented Feb 10, 2020 at 11:08

2 Answers 2

0

The problem occurs because ext-filter not enabled or installed.

Need to install ext-filter module. I guess it should be enabled by default.

Alternatively, you can use other approaches on the code side instead of filter_var().

  1. https://stackoverflow.com/a/4154711
  2. https://stackoverflow.com/a/1544403
answered Feb 8, 2020 at 12:41
0

Here is the tutorial for you to set up library justinrainbow: https://github.com/pepe1518/magento2/tree/master/vendor/justinrainbow/json-schema

answered Feb 15, 2020 at 2:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.