Page MenuHomePhabricator

Call to a member function getAttribute() on null in SvgFile
Closed, ResolvedPublic5 Estimated Story Points

Description

Trying to parse some files, e.g. [[commons:File:Neural crest.svg]] for translations produces fatals. Example using my API patch:

Error:
Call to a member function getAttribute() on null

  at src/Model/Svg/SvgFile.php:375
  at App\Model\Svg\SvgFile->analyse()
     (src/Model/Svg/SvgFile.php:414)
  at App\Model\Svg\SvgFile->getInFileTranslations()
     (src/Controller/ApiController.php:74)
  at App\Controller\ApiController->getTranslations('Neural_crest.svg')
     (vendor/symfony/http-kernel/HttpKernel.php:149)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:66)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:188)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (public/index.php:33)
  at require('/Users/msemenik/dev/svgtranslate/public/index.php')
     (vendor/symfony/web-server-bundle/Resources/router.php:42)

Event Timeline

MaxSem renamed this task from Call to a member function getAttribute() on null to Call to a member function getAttribute() on null in SvgFile.Nov 20 2018, 4:16 AM
MaxSem set the point value for this task to 5.
MaxSem moved this task from Ready to In Development on the Community-Tech-Sprint board.
Niharika moved this task from QA to Q2 2018-19 on the Community-Tech-Sprint board.

Don't think this is eligible for a Product/QA review.

This issue is still referenced in testGetFileWithTranslations() which is tagged as broken.