Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 301255

Database::startLog() cause a notice in Shortcut::sort()

$
0
0

Problem/Motivation

Database::startLog() calls Log::findCaller() that calls debug_backtrace() that broke uasort() with

Warning: uasort(): Array was modified by the user comparison function in Drupal\shortcut\Entity\ShortcutSet->getShortcuts() (line 125 of core/modules/shortcut/src/Entity/ShortcutSet.php).

because of this bug: https://bugs.php.net/bug.php?id=50688

Proposed resolution

  1. put a @ before uasort in ShortcutSet::getShortcuts()
  2. use debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) instead of debug_backtrace() (but then we cannot collect args)

Remaining tasks

Decide which solution is better.

User interface changes

None

API changes

None

Data model changes

With solution 2 we don't collect function args.


Viewing all articles
Browse latest Browse all 301255

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>