react – useState no Context API retorna undefined

Boa noite.

Quando eu tento setar um JSON que é retornado da API fica como undefined. No entanto, se eu colocar um console.log(user) ele mostra os dados, quando eu coloco setUserLogged(user) retorna como undefined.

As prints abaixo exemplificam o que está acontecendo.

Código completo:

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

views – Notice: Undefined offset: 0 in Errors.php

  • When I visit my site, it looks just fine.
  • After I enter the valid credentials and click login, I get a blank page but URL shows Even though, I get a blank page, I assume I logged in.
  • I can access admin panel and able to click all the buttons (structure, config, report, etc.)
  • While logged in, I click the home link to go to home page but I get the following error:

Notice: Undefined offset: 0 in
…/core/lib/Drupal/Core/Utility/Error.php on line 122

Notice: Undefined index: file in …/core/includes/ on line

Notice: Undefined index: line in …/core/includes/ on line

I can send you Error.php and files if you would like to see it.

I was working in views contextual filter which caused the above issue. In views contextual filter, I had “Provide a default value” selected and I changed it to “display all results…”. Then my site got broken.

enter image description here

How can I fix the above errors?

Undefined variable error in array

I have a collection of check boxes all with the name c() but different values. From php8 the code below works but gives me an 'Undefined variable $sql_c’ warning (perhaps this error was just suppressed in earlier versions?). I was given the code years back and have now updated it with numerous 'if isset()' functions, but if I do that to the $sql_c function, I get no results. Any help would be appreciated.

if (isset($_POST('submit')) && isset($_POST('c'))) {...

Undefined variable error in array

(1/1) ErrorException Undefined offset: 0

when I want to show a record from my database I get the error

when I want to show a record from my database I get the error and I don’t know why:

it says this:

(1/1) ErrorException
Undefined offset: 0

this is my controller

this is my controller

Fatal error: Uncaught Error: Call to undefined method WP_Error::has_errors()

I tried to install a “NEVE” theme and got this error. Not knowing how to fix it. Please help how this can be fixed.
The goal I want to achieve is to bring back the theme I used before, namely the original WordPress theme 2017. Let me clarify that the problem happened the day before.
The places where are added dots “….” are from me.

Fatal error: Uncaught Error: Call to undefined method WP_Error::has_errors() in /home/…../addon_domains/…../wp-content/themes/neve/functions.php:81
Stack trace: #0 /home/…../addon_domains/…../wp-settings.php(425): include() #1
/home/…../addon_domains/…../wp-config.php(103): require_once(‘/home/concretec…’) #2 /home/…../addon_domains/…../wp-load.php(37): require_once(‘/home/concretec…’) #3 /home/…../addon_domains/…../wp-blog-header.php(13): require_once(‘/home/concretec…’) #4 /home/…../addon_domains/…../index.php(17): require(‘/home/concretec…’) #5 {main} thrown in /home/…../addon_domains/…../wp-content/themes/neve/functions.php on line 81

magento2.4 – Magento 2.4 – Category Image showing Nan undefined in backend

When I upload category image in backend and save the category, it start reflect on frontend but in backend it is showing broken.

enter image description here

The category image path in frontend /media/catalog/category/image.jpg but in backend, path is showing as

How to resolve it?

custom taxonomy – Warning: Undefined variable $post in C:xampphtdocs………after PHP upgrade

I use localhost for testing and debugging sites, before making changes to the live site. Because MySQL failed in XAMPP, I had to install XAMPP from scratch. I’m now using PHP version 8.0.3. Everything worked yesterday, so it must have something to do with upgrading my version of PHP.

This code used to work. It displayed the artist name (custom product taxonomy) with the associated product in WooCommerce. Now, it’s absolutely not working.

This was my code:

<div style="background-color: #f6f6f6 !important;">
<?php $terms = get_the_terms( $post->ID, 'product_artist' );
    if ( !empty( $terms ) ){
        // get the first term
        $term = array_shift( $terms );
    $artist = $term->slug;
    $url = get_site_url();
    $name = ucwords(str_replace('-', ' ', $artist));
    <div class="by-artist" style="color: #BCA47B !important; background-color: #F6F6F6; font-size: 14px; padding: 5px 0px 10px 0px">
    <a href="<?php echo $url . '/artists/' . $artist; ?>">
    <?php echo $name; ?></a>

Does anyone know why this would stop working in PHP 8xx? More importantly, how do I fix it.

Thank you.

hooks – Undefined function ‘entity_metadata_wrapper’ () in Drupal 9

in my custom module i found this error when i tried this code

function sun_blogs_views_pre_render(&$view) {

  if($view->name === 'blog_listing') {
    //general listing...
    if($view->current_display === 'page') {
      //lets get rid of the 'home' crumb

    //category listing...
    if($view->current_display === 'page_1') {
      $title = '';
      if(isset($view->argument('tid'))) {
        $term = DrupaltaxonomyEntityTerm::load($view->argument('tid')->value(0));
        $title = $term->name;
      $breadcrumbs = array(
        Drupal::service('link_generator')->generate(t('Blog'), 'blog'),
    //author listing...
    if($view->current_display === 'page_2') {
      $name = '';
      if(isset($view->argument('nid'))) {
        $nid = $view->argument('nid')->argument;
        if(is_numeric($nid)) {
          $node = DrupalnodeEntityNode::load($nid);
          $name = $node->title;
      $breadcrumbs = array(
        Drupal::service('link_generator')->generate(t('Blog'), 'blog'),
      $view->description = $name;
      if(isset($node)) {
        $wrapper = entity_metadata_wrapper('node', $node);
        $title = $wrapper->field_job_title->value();
        if(strlen($title)) {
          $view->description .= ' - '  . $title;

how to use it ,pl help me with it .

Por que a string com os dados da API está dando undefined?

const { Client, Message, MessageAttachment} = require("discord.js")
const Discord = require("discord.js");
const axios = require('axios')

module.exports = {
    execute(message) {
        message.attachments.forEach(attachment => {
            const ImageLink = attachment.proxyURL;
            let siteanime = (`${ImageLink}`);
            const request =  axios.get(`${ImageLink}`);
            const filteredAnime =
                (anime) => anime.similarity > 0.80
              return getFormattedText(filteredAnime);          

Print Terminal

Tô achando que é algo com o axios.

terminology – Is there a common industry term to describe moving a task down in priority to an undefined “later” time?

A note for the moderators: this question is looking for INDUSTRY terminology (like SCRUM, Spike, Big O, Visitor Patter, etc) terminology, not opinions about how I should speak.

Let’s say that in our ticketing system a task will involve doing A, B, C, and D.

While doing the task, I find that doing C will require too large an investment for now and is not very high priority.

I have been saying something like “Let’s do A, B, and D, but I think we should punt on C for now”.

I looked up “punt on” and it seems to mean only to “not do”, not to put off until later. At least that’s what the results in Google told me.

Am I using “punt on” wrong? Is there a better term for this?