Title: Dashboard activity notices (errors), has patch &#8211; needs developer check
Last modified: August 21, 2016

---

# Dashboard activity notices (errors), has patch – needs developer check

 *  [Ruud Laan](https://wordpress.org/support/users/ruudjoyo/)
 * (@ruudjoyo)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/dashboard-activity-notices-errors-has-patch-needs-developer-check/)
 * Hi,
 * I came across this nasty dashboard activity notice: “A non well formed numeric
   value encountered”
 * And traced it down to the ‘get_the_time’ filter.
    In this filter hook qTranslate
   does its magic on date formatting etc.
 * The usage in the new 3.8 dashboard activity widget uses this with the ‘U’ option,
   to retrieve the Unix epoch timestamp for the post.
 * I created this (possible) patch to accommodate that scenario:
 * Index: htdocs/wp-content/plugins/qtranslate/qtranslate_utils.php
    ===========
   ======================================================== — htdocs/wp-content/
   plugins/qtranslate/qtranslate_utils.php (revision 824615) +++ htdocs/wp-content/
   plugins/qtranslate/qtranslate_utils.php (working copy) @@ -165,6 +165,7 @@ global
   $q_config; // check for multilang formats $format = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage(
   $format); + $default_format = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage(
   $default_format); switch($q_config[‘use_strftime’]) { case QT_DATE: @@ -175,6
   +176,9 @@ case QT_STRFTIME: return $format; case QT_STRFTIME_OVERRIDE: + if (
   $format == ‘U’ ) { + return $format; + } return $default_format; } } Index: htdocs/
   wp-content/plugins/qtranslate/qtranslate_core.php ===========================
   ======================================== — htdocs/wp-content/plugins/qtranslate/
   qtranslate_core.php (revision 824615) +++ htdocs/wp-content/plugins/qtranslate/
   qtranslate_core.php (working copy) @@ -413,8 +413,8 @@ /* BEGIN DATE TIME FUNCTIONS*/
 *  function qtrans_strftime($format, $date, $default = ”, $before = ”, $after =”){
   –//
   don’t do anything if format is not given – if($format==”) return $default; + //
   don’t do anything if format is not given or the format is supposed to return 
   the seconds since the Unix Epoch + if($format==” || $format==’U’) return $default;//
   add date suffix ability (%q) to strftime $day = intval(ltrim(strftime(“%d”,$date),’
   0′)); $search = array();
 * [http://wordpress.org/plugins/qtranslate/](http://wordpress.org/plugins/qtranslate/)

The topic ‘Dashboard activity notices (errors), has patch – needs developer check’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/qtranslate.svg)
 * [qTranslate](https://wordpress.org/plugins/qtranslate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/qtranslate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/qtranslate/)
 * [Active Topics](https://wordpress.org/support/plugin/qtranslate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qtranslate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qtranslate/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Ruud Laan](https://wordpress.org/support/users/ruudjoyo/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/dashboard-activity-notices-errors-has-patch-needs-developer-check/)
 * Status: not resolved