Giter Club home page Giter Club logo

Comments (10)

xerc avatar xerc commented on August 22, 2024 1

aber gern 😄

from sourceopt.

xerc avatar xerc commented on August 22, 2024

$svgFileArr = GeneralUtility::makeInstance(\HTML\Sourceopt\Resource\SvgFileRepository::class)->findAllByStorageUids(\array_keys($storageArr));
foreach ($svgFileArr as $index => $row) {
if (!$this->svgFileArr[($row['path'] = '/'.$storageArr[$row['storage']].$row['identifier'])] = $this->addFileToSpriteArr($row['sha1'], $row['path'])) { // ^[/]
unset($this->svgFileArr[$row['path']]);

from sourceopt.

xerc avatar xerc commented on August 22, 2024

@bavarianbytes can not re-create this notice @ TYPO3 11.5.16 / PHP 8.1 ; did you try dev-master?

from sourceopt.

lochmueller avatar lochmueller commented on August 22, 2024

I also don't saw the error... but I suggest to avoid assignments in conditions. Perhaps we should avoid the double assignment in this condition to increase the readability of the code?!

from sourceopt.

lochmueller avatar lochmueller commented on August 22, 2024

@bavarianbytes Please check again current master. If the problem is still there, please send us a note...

from sourceopt.

bavarianbytes avatar bavarianbytes commented on August 22, 2024

Thanks, tried the current master. The exception is caused by line 162 now:
$this->svgFileArr[$file['path']] = $file['defs'];

Full Exception:

at TYPO3\CMS\Core\Error\ErrorHandler->handleError(8192, 'Automatic conversion of false to array is deprecated', '/Users/***/typo3conf/ext/sourceopt/Classes/Service/SvgStoreService.php', 162)
in /Users/***/typo3conf/ext/sourceopt/Classes/Service/SvgStoreService.php line 162
            $file['path'] = '/'.$storageArr[$file['storage']].$file['identifier']; // ^[/]
            $file['defs'] = $this->addFileToSpriteArr($file['sha1'], $file['path']);

            if (null !== $file['defs']) {
                $this->svgFileArr[$file['path']] = $file['defs'];
            }
        }
        unset($storageArr, $storage, $fileArr, $file); // save MEM

from sourceopt.

xerc avatar xerc commented on August 22, 2024

please add a var_dump($file); in line [160] and past the output here - thx

from sourceopt.

bavarianbytes avatar bavarianbytes commented on August 22, 2024

var_dump($file);

array(5) { ["storage"]=> int(1) ["identifier"]=> string(27) "/demo/logos/basic_ipsum.svg" ["sha1"]=> string(40) "05cef80e9b3ba6573a0a9d7ee11388caedf5e03e" ["path"]=> string(37) "/fileadmin/demo/logos/basic_ipsum.svg" ["defs"]=> array(2) { ["attr"]=> string(22) "viewBox="0 0 1998 434"" ["hash"]=> string(40) "05cef80e9b3ba6573a0a9d7ee11388caedf5e03e" } }

from sourceopt.

xerc avatar xerc commented on August 22, 2024

found it ; FIX @ https://github.com/lochmueller/sourceopt/pull/107/files << you may try it manually

from sourceopt.

bavarianbytes avatar bavarianbytes commented on August 22, 2024

Works! Thank you!

from sourceopt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.