Opened 6 years ago

Closed 6 years ago

#16593 closed defect (invalid)

Bug in lang.mixin()

Reported by: evogli Owned by: evogli
Priority: undecided Milestone: tbd
Component: Parser Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

dojo/_base/lang.js line 79

if(!(name in dest)
(dest[name] !== s && (!(name in empty) empty[name] !== s))){

dest[name] = copyFunc ? copyFunc(s) : s;

}

I have a widget that is failing to parse because when it gets to this line "dest" is a string.

There should be a check if dest is an object before assuming so.

Change History (6)

comment:1 Changed 6 years ago by bill

Resolution: invalid
Status: newclosed
Summary: Bug inBug in lang.mixin()

It's not a bug, it's a requirement that the the first argument to lang.mixin() must be an object rather than null. Passing null doesn't make any sense.

We typically don't bloat our code with checks about valid parameters.

comment:2 Changed 6 years ago by evogli

If that's the case then the parser somewhere doesn't do a check before calling this method.

I have a data-dojo-type on a div in a widget template which fails on this line. If the parser is mistakenly calling this method on a string type then it should be checked there.

comment:3 Changed 6 years ago by bill

Please attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, almost always a single HTML file that we can load in the browser (i.e. not PHP, JSP, etc.)

Then, give exact instructions on how to reproduce the problem using your attached test file.

The test case is necessary both to confirm that there's a bug, and for us to be able to debug the problem.

Thanks!

comment:4 Changed 6 years ago by bill

Resolution: invalid
Status: closedreopened

comment:5 Changed 6 years ago by bill

Component: GeneralParser
Owner: set to evogli
Status: reopenedpending

comment:6 Changed 6 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.