Hi, My new theme got these notice on description menu function
Reference for the function code by kriesi : http://www.kriesi.at/archives/improve-your-wordpress-navigation-menu-output
On my side I didn’t get any notices like the reviewer sent me the pic here:
so the problem is in the line 44, 46, 47, 49 for the property of non object,here is my code:
please help me to figure it out please because I didn’t get the notices on my side so I can’t test to fix it.
Best regards, Decneo
Hi, Decneo!
I sugest two things. First, try to post a more complete code. The code you posted is referencing a variable named “args” and we don’t see in what you posted where is that declared. So, first of all, try to post what comes before that in your code.
Second, try by all means to replicate the bug for yourself. Did the error appear on the back end or at the front end? If you can’t see it when you navigate the site or the admin, try to log out (off course, not for the admin
) and see if then it appears. It this particular case, I don’t think that could be it, but you never know. Again, try to post more code here.
And have a happy new year! 
quadroIdeas said
Hi, Decneo!I sugest two things. First, try to post a more complete code. The code you posted is referencing a variable named “args” and we don’t see in what you posted where is that declared. So, first of all, try to post what comes before that in your code.
Second, try by all means to replicate the bug for yourself. Did the error appear on the back end or at the front end? If you can’t see it when you navigate the site or the admin, try to log out (off course, not for the admin
And have a happy new year!) and see if then it appears. It this particular case, I don’t think that could be it, but you never know. Again, try to post more code here.
![]()
Hi, quadroIdeas. Thank you for your replied Happy new year too.
Here is my complete code :
( click image to link to big image )
the notice appear on the front end after using debug bar plugins but on my side I didn’t get the notice only for the reviewer. I only got this soft rejected 1 week now, so I would like to figure this out.
Best regards, Decneo
Alright… it surely looks like the variable $args isn’t being defined. Which for me is weird. I should study that walker class a little more, I think. Give me some time and I’ll try to figure that out.
quadroIdeas said
Alright… it surely looks like the variable $args isn’t being defined. Which for me is weird. I should study that walker class a little more, I think. Give me some time and I’ll try to figure that out.
Thank you quadroIdeas for your time to replied me,I appreciated.
Best regards, Decneo
Hi, everyone so sad for this issue, It took my time 2 weeks now. I’ve added $args = (object) $args; before $item_output = $args->before; and thought it will solve the issue and re-submission the theme waiting 3 days and got this from reviewer :
Additionally, we have some extra feedback for you:
This is a resubmission of a previously rejected submission. Resubmitting without making the required changes or any improvements is not considered acceptable use of the Envato marketplaces and repeated attempts may result in a temporary or permanent suspension of authorship.
the problem is on my side I didn’t get those notices like the picture below, if I didn’t get so it hard for me to fix the issue and make those notices gone.
on my side :
debug bar and another plugin : ( Enable WP_DEBUG to true )
No notice : Example on my homepage
( click for full image )
If I got the notice I will hesitate to fix it, but honestly I didn’t get those. I didn’t think to cheat anyone.
Best regards, Decneo
Bump..
How about
var_dump($args);
so you can check what’s happening with that? It might be null (or non-object) only for certain menu items, so you can write check code to avoid errors…
I would also suggest trying to activate your theme on a fresh WP install (and on a new database) before you create any menu. Try to see if you get the errors that way. The var_dump would help too, so try to bring the results to here.
rvision_ said
How aboutvar_dump($args);so you can check what’s happening with that? It might be null (or non-object) only for certain menu items, so you can write check code to avoid errors…
I’ve tried use var_dump($args); before but didn’t see the null object.
here is the screenshot :
Best regards, Decneo
