Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

setting crashed_thread to -1 if there was no identified crashing thread fixes bug 528578 #391

Closed
wants to merge 14 commits into from

5 participants

@ghost

No description provided.

webapp-php/application/libraries/CrashReportDump.php
@@ -198,7 +198,7 @@ public function _parseDump($report) {
case 'Crash':
$report->reason = $values[1];
$report->address = $values[2];
- $report->crashed_thread = intval($values[3]);
+ $report->crashed_thread = ($values[3] === "" ? -1 : intval($values[3]));
@AdrianGaudebert Owner

Are you sure $values[3] will always be a string? Why not use empty($values[3]) instead so you also consider null?

@ghost
ghost added a note

It will, but your suggestion is much more bullet proof

@ghost
ghost added a note

Due to a side effect of the value 0 when using empty with strings, it is not going to work in this instance. I believe we are safe just simply checking for an empty string. http://www.zachstronaut.com/posts/2009/02/09/careful-with-php-empty.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
webapp-php/application/views/report/index.php
@@ -278,12 +278,17 @@
<?php endforeach ?>
</table>
<?php } ?>
-
- <h2>Crashing Thread</h2>
- <?php if (isset($report->threads) && count($report->threads) > $report->crashed_thread ){
+
+ <?php
+ /* First ensure that a crashing thread was identified by testing that $report->crashed_thread is not -1 */
+ if($report->crashed_thread != -1) {
+ if (isset($report->threads) && count($report->threads) > $report->crashed_thread ){
@AdrianGaudebert Owner

Just for styling coherence, please add a space before each { and after each if. :)

@ghost
ghost added a note

Will do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@lonnen
Owner

My apologies, but this will need to be rebased because of the history mangle last week.

git checkout master
git checkout -b bug528578-improperly-identified-crashing-thread
git cherry-pick 6c1e7bf
git push github bug528578-improperly-identified-crashing-thread

and reopen from the clean branch

@lonnen lonnen closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 23, 2012
  1. @schalkneethling
Commits on Feb 27, 2012
  1. @schalkneethling
  2. @lonnen
Commits on Feb 28, 2012
  1. @AdrianGaudebert

    Merge pull request #384 from Lonnen/690462-tcbu-removal

    AdrianGaudebert authored
    bug 690462 - purge dead code, tidy up a bit
  2. @AdrianGaudebert

    Merge pull request #381 from ossreleasefeed/remove-old-jquery-730772

    AdrianGaudebert authored
    removed old version of jQuery, fixes bug 730772
  3. @AdrianGaudebert

    Merge pull request #364 from ossreleasefeed/bugzilla-link-not-https-7…

    AdrianGaudebert authored
    …15202
    
    ensure that bug_file_loc always uses the correct protocol fixes bug 715202
  4. @AdrianGaudebert
  5. @lonnen
  6. @lonnen
  7. @lauraxt
  8. @AdrianGaudebert

    Merge pull request #386 from Lonnen/731022-css-prefix

    AdrianGaudebert authored
    bug 731022 replace prefixed css with unprefixed
  9. @lonnen

    Merge pull request #387 from AdrianGaudebert/729358-clean-up-code-for…

    lonnen authored
    …-check-py
    
    Fixes bug 729358 - Cleaned code up for check.py.
  10. @jberkus
Commits on Feb 29, 2012
  1. @schalkneethling
Something went wrong with that request. Please try again.