TypeError: Unsupported operand types: int * string
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 598
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
I'm getting an unsupported operand error every time cron is run in the background. The result is that nextcloud reports that cron has not been run in x days if I leave the maps app enabled.
Steps to reproduce
- Schedule cron.php to run every 5 minutes or start manually.
- Error ensues
Expected behaviour
It should run cron.php until the next cron cycle.
Actual behaviour
It seems to just fail. I'm trying to populate photo locations on the map.
Server configuration
Operating system:
openSUSE Tumbleweed
Web server:
Server version: Apache/2.4.48 (Linux/SUSE)
Server built: 2021-06-02 07:37:52.000000000 +0000
Database:
mysql
PHP version:
PHP 8.0.8 (cli) (built: Jul 1 2021 00:00:00) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.8, Copyright (c) Zend Technologies
with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies
Nextcloud version: (see Nextcloud admin page)
20.0.0.11
Group folders version:
Updated from an older Nextcloud/ownCloud or fresh install:
Attempted, but failed, so copied over folder to new directory.
Where did you install Nextcloud from:
tarball and then upgraded to 20.0.0.11
Are you using external storage, if yes which one: local/s3/smb/sftp/...
local
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/Saml/...
Client configuration
Browser:
Chrome 91
Operating system:
Logs
Web server error log
Web server error log
Insert your webserver log here
`[proxy_fcgi:error] [pid 1832:tid 140484534068800] [client 59.190.3.189:54540] AH01071: Got error 'PHP message: PHP Deprecated: Required parameter $begin follows optional parameter $categoryList in /srv/www/htdocs/nextcloud/apps/maps/lib/Controller/FavoritesController.php on line 216PHP message: PHP Deprecated: Required parameter $end follows optional parameter $categoryList in /srv/www/htdocs/nextcloud/apps/maps/lib/Controller/FavoritesController.php on line 216'`
#### Nextcloud log (data/nextcloud.log)
`{"reqId":"vKEU99KvurUoOcS3uGEd","level":3,"time":"2021-07-21T07:30:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Unsupported operand types: int * string","userAgent":"--","version":"22.0.0.11","exception":{"Exception":"TypeError","Message":"Unsupported operand types: int * string","Code":0,"Trace":[{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelCanonMakerNotes.php","line":215,"function":"loadSingleValue","class":"lsolesen\\pel\\PelIfd","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","line":406,"function":"load","class":"lsolesen\\pel\\PelCanonMakerNotes","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelTiff.php","line":159,"function":"load","class":"lsolesen\\pel\\PelIfd","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelExif.php","line":108,"function":"load","class":"lsolesen\\pel\\PelTiff","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":216,"function":"load","class":"lsolesen\\pel\\PelExif","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":126,"function":"load","class":"lsolesen\\pel\\PelJpeg","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":442,"function":"__construct","class":"lsolesen\\pel\\PelJpeg","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":384,"function":"getExifPelBackup","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":264,"function":"getExif","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/BackgroundJob/AddPhotoJob.php","line":56,"function":"addPhotoNow","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\Maps\\BackgroundJob\\AddPhotoJob","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/public/BackgroundJob/QueuedJob.php","line":47,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/srv/www/htdocs/nextcloud/cron.php","line":127,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->"}],"File":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","Line":447,"CustomMessage":"--"}}`
<summary>Nextcloud log</summary>
Insert your Nextcloud log here
{"reqId":"e8ipz8kuNkafAZPh1XB9","level":3,"time":"2021-07-21T07:15:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Unsupported operand types: int * string","userAgent":"--","version":"22.0.0.11","exception":{"Exception":"TypeError","Message":"Unsupported operand types: int * string","Code":0,"Trace":[{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelCanonMakerNotes.php","line":215,"function":"loadSingleValue","class":"lsolesen\\pel\\PelIfd","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","line":406,"function":"load","class":"lsolesen\\pel\\PelCanonMakerNotes","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelTiff.php","line":159,"function":"load","class":"lsolesen\\pel\\PelIfd","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelExif.php","line":108,"function":"load","class":"lsolesen\\pel\\PelTiff","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":216,"function":"load","class":"lsolesen\\pel\\PelExif","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelJpeg.php","line":126,"function":"load","class":"lsolesen\\pel\\PelJpeg","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":442,"function":"__construct","class":"lsolesen\\pel\\PelJpeg","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":384,"function":"getExifPelBackup","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/Service/PhotofilesService.php","line":264,"function":"getExif","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/apps/maps/lib/BackgroundJob/AddPhotoJob.php","line":56,"function":"addPhotoNow","class":"OCA\\Maps\\Service\\PhotofilesService","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/public/BackgroundJob/Job.php","line":79,"function":"run","class":"OCA\\Maps\\BackgroundJob\\AddPhotoJob","type":"->"},{"file":"/srv/www/htdocs/nextcloud/lib/public/BackgroundJob/QueuedJob.php","line":47,"function":"execute","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/srv/www/htdocs/nextcloud/cron.php","line":127,"function":"execute","class":"OCP\\BackgroundJob\\QueuedJob","type":"->"}],"File":"/srv/www/htdocs/nextcloud/apps/maps/vendor/lsolesen/pel/src/PelIfd.php","Line":447,"CustomMessage":"--"},"id":"60f7c97635d9d"}
Browser log
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the stack trace at apps/maps/vendor/lsolesen/pel/src/PelCanonMakerNotes.php:215 and follow the calls through lib/Service/PhotofilesService.php and lib/BackgroundJob/AddPhotoJob.php. Run cron with Maps enabled and photo processing active to reproduce the TypeError. Done means the background job completes without this error and cron continues processing photos.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100