Skip to content

Conversation

@tcitworld
Copy link
Member

@tcitworld tcitworld commented Sep 21, 2025

console.php loads the provider to collect with  IRequest even though we have no user-agent information, so let's fallback to an empty string.

Similar issue at nextcloud/server#55241

An unhandled exception has been thrown:
ErrorException: Undefined array key "HTTP_USER_AGENT" in server/apps/profiler/lib/DataCollector/HttpDataCollector.php:31
Stack trace:
#0 server/apps/profiler/lib/DataCollector/HttpDataCollector.php(31): OCA\Files\Command\ScanAppData->exceptionErrorHandler()
#1 server/lib/private/Profiler/Profiler.php(69): OCA\Profiler\DataCollector\HttpDataCollector->collect()
#2 server/console.php(98): OC\Profiler\Profiler->collect()
#3 server/occ(33): require_once('...')
#4 {main}%

…through occ

console.php loads the provider to collect with IRequest even though we have no user-agent
information, so let's fallback to an empty string

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@nickvergessen nickvergessen merged commit 847d06c into master Sep 21, 2025
21 checks passed
@nickvergessen nickvergessen deleted the handle-no-user-agent branch September 21, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants