Magento2 : Error The “Is New” attribute value is empty. Set the attribute and try again

Getting error Magento2: Error The “Is New” attribute value is empty. Set the attribute and try again. when adding new product category

Warning: ltrim() expects parameter 1 to be string, array given in /home/magentoiknoortec/public_html/vendor/magento/module-catalog/Model/Category/FileInfo.php on line 136

enter image description here

Почему empty говорит, что массив пуст, когда он заполнен в PHP?

Меня интересует вопрос по PHP, а именно работу Reflection и private свойства класса. У меня есть некий класс, у которого все приватные методы. Магический метод __get реализован на выдачу return $ this->$ name. Когда я в другом классе через рефлексию получаю значения приватных свойств, то empty() возвращает true, is_array() возвращает true, countвозвращает 1 или более.

$  reflect = new \ReflectionClass($  some_class); $  props = $  reflect->getProperties(\ReflectionProperty::IS_PRIVATE);  foreach ($  props as $  prop) {     $  prop_name = $  prop->getName();      if (is_null($  some_class->$  prop_name) || empty($  some_class->$  prop_name)) {         throw new \Exception(...);     }  } 

Стандартный метод $ prop->getValue(); выдает ошибку о том, что не может обращаться не к public методам.

В чем прикол?

Empty or unknow structure in JNA

Пишу обертку для Leap Motion в Java. dll подключаю через JNA. Пытаюсь реализовать код подключения к устройству, который выглядит примерно так на языке Си:

LEAP_CONNECTION connectionHandle = NULL; LeapCreateConnection(NULL, &connectionHandle); LeapOpenConnection(connectionHandle); 

В описании про LEAP_CONNECTION сказано: “struct LEAP_CONNECTION – A handle to the Leap connection object.” И собственно это все. Что за структура, что содержит, неизвестно и не понятно. Объект класса Structure отказывается создаваться без полей. При этом дальнейшая работа с connectionHandle как бы не нужна, эта переменная будет использоваться только в вызовах. На что можно заменить Structure? Пытался играться с классом Memory, но не совсем понимаю как можно заменить Structure.ByValue Вот некоторые ссылки на документацию по Leap Motion: https://developer.leapmotion.com/documentation/v4/group___structs.html#struct_l_e_a_p___c_o_n_n_e_c_t_i_o_n

https://developer.leapmotion.com/documentation/v4/callback-example.html#ExampleConnectionc

wallet.dat from 2014 shown as empty with latest client 0.18

I have bitcoin wallet from 2014. I have saved it encrypted. Since then I haven’t checked it, until now. I did sync the whole bitcoin block-chain and when copy my wallet.dat and re-scan wit the client, the wallet got shown as empty. My wallet.dat is 88kb. Bitcon core Client dump of the wallet shows addresses only from 2019 and wallet keys dump from the client returns error. Any help is appreciated.

Given three circles with non-empty two-way intersections, what is the condition that their three-way intersection is empty?

Given the center coordinates $ \{x_i,y_i\}$ and radii ($ r_i$ ) of three circles ($ i=1,2,3$ ) (the areas of which are certain probabilities), the three pairwise intersections being all non-empty, what is the condition that their three-way intersection is, on the other hand, empty?

In particular, I have in mind three circles $ A,B,C$ of radii $ \frac{8 \pi}{27 \sqrt{3}}$ and $ \frac{1}{6}$ and $ \frac{1}{6}$ . The intersection of $ B$ and $ C$ is $ \frac{1}{9}$ and $ A \land B$ and $ A \land C$ are both $ -\frac{4}{9}+\frac{4 \pi }{27 \sqrt{3}}+\frac{\log (3)}{6} \approx 0.00736862$ , while as indicated, $ A \land B \land C$ is $ \varnothing$ .

This problem pertains to my efforts (https://mathematica.stackexchange.com/questions/198019/create-a-venn-diagram-showing-the-relations-of-three-sets-of-quantum-states/198091#198091) to represent–via a Venn or related diagram–the Hilbert-Schmidt probabilities of certain quantum (“positive-partial-transpose” and “bound-entangled”) “two-qutrit” states (representable by $ 9 \times 9$ density matrices).

So, how to locate the three centers–subject to the three circles all being contained in a circle (arbitrarily centered at the origin) of area/probability 1–is also in question (https://math.stackexchange.com/questions/3224845/given-a-circle-a-of-area-1-centered-at-0-0-give-conditions-that-another).

Product attribute value visible in Catalog table but its field is empty in Edit Product form

I have a strange issue with Magento 2.2.5 where two of my product attributes have its values showing in the Catalog Table, but when you click into the product itself to edit, the field for that attribute is empty.

Catalog table: enter image description here

Product edit form: enter image description here

I’ve tried a full reindex, and cleared the Magento cache as well, but none of that helps.

I’ve compared the two attribute configurations on a database level using:

SELECT * FROM `mydb`.`eav_attribute` WHERE `backend_type` = "varchar" 

But the configurations are exactly the same as other attributes where it doesn’t have such an issue.

I have also compared the actual value in database with other attributes that don’t have this issue:

SELECT * FROM `catalog_product_entity_varchar` 

Again, exactly the same.

Interesting note, when I duplicate the product, the two attributes are the only fields that do not get cloned over to the duplicate product. This means that the duplicate product has these two fields set to the field’s default values, and even these default values don’t appear in the Edit Product form! I have no idea what else I can try to fix this.

enter image description here

Mail command body empty while attaching files

In ubuntu 16.04 the below command works fine the mail will have a body and file attachment the mail command version is mail (GNU Mailutils) 2.99.99

mail -s “test” -A /tmp/test.txt test@test.com < /tmp/log.txt

But the same command does not work in Ubuntu 18.04 the file is being attached but the body is blank the mail command version is mail (GNU Mailutils) 3.4

Can’t get status network interface, $1 is empty

2 days ago I installed Ubuntu 19.04

After tried to exec script for check status

#!/bin/bash logger "Running $  0" case "$  1" in     eth*)  # oder auch enx*), .. bitte mit <ifconfig -a> ermitteln         if [ "$  2" == up ]; then         logger "$  1 $  2 wifi off"         nmcli radio wifi off         elif [ "$  2" == down ]; then         logger "$  1 $  2 wifi on"         nmcli radio wifi on      fi         ;; esac 

In result – own process don’t come in case, because $ 1 is empty.

How solve this problem?